[R-sig-ME] Exponent random effect in nlmer
Cole, Tim
tim.cole at ucl.ac.uk
Tue Oct 11 11:29:13 CEST 2016
I have a model of the form
m1 <- lmer(y ~ f + (1 | id) )
where y is a continuous variable centred on zero, f is a unordered factor with coefficients b such 0 < b < 1, and there is a signficant random subject intercept.
The random intercept can lead to predicted values outside the valid range (0, 1). For this reason I'd like to reformulate the model as
m2 <- nlmer(y ~ (f - 1) ^ exp(1 | id) ) (using a invalid but I hope obvious notation), where the random effect is now a power centred on 1. This would constrain the fitted values to be within c(0, 1).
My question is: can this be done in nlmer, and if so how? Please can someone point me in the right direction?
Thanks,
Tim Cole
---
Tim.cole at ucl.ac.uk<mailto:Tim.cole at ucl.ac.uk> Phone +44(0)20 7905 2666 Fax +44(0)20 7905 2381
Population, Policy and Practice Programme
UCL Great Ormond Street Institute of Child Health, London WC1N 1EH, UK
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list