[R-sig-ME] Fixed covariates in nlmer()
Marko Bachl
marko.bachl at uni-hohenheim.de
Fri Nov 9 08:10:25 CET 2012
Dear all,
I have unsucessfully tried to figure out the syntax of nlmer() to
include fixed covariates in a nonlinear mixed-effects model.
This is how the syntax looks like in nlme() using the CO2 data.
m0.nlme = nlme(uptake ~ SSasympOff(conc, Asym, lrc, c0), fixed = Asym
+ lrc + c0 ~ 1, random = Asym + lrc + c0 ~ 1, data = CO2, start =
c(32.5, -4.7, 43.1)) # Model without fixed covariates
summary(m0.nlme)
m1.nlme = update(m0.nlme, fixed = Asym + lrc + c0 ~ Type * Treatment,
start = c(32.5, 0, 0, 0, -4.7, 0, 0, 0, 43.1, 0, 0, 0)) # Model with
fixed covariates
summary(m1.nlme) #does include estimates for fixed effects
anova(m0.nlme, m1.nlme) # Models are different
In nlmer(), the only model expression I could find without getting
syntax error messages looks like this:
m0.nlmer = nlmer(uptake ~ SSasympOff(conc, Asym, lrc, c0) ~ Asym + lrc
+ c0 | Plant, data = CO2, start = c(Asym = 32.5, lrc = -4.7, c0 =
43.1)) # Model without fixed covariates
summary(m0.nlmer)
m1.nlmer = nlmer(uptake ~ SSasympOff(conc, Asym, lrc, c0) ~ Asym *
Type * Treatment + (Asym + lrc + c0 | Plant), data = CO2, start =
c(Asym = 32.5, lrc = -4.7, c0 = 43.1)) # Model with fixed covariates;
Starting Values remain as in m0.
summary(m1.nlmer) #Does not include estimates for fixed effects
anova(m0.nlmer, m1.nlmer) # Models are excactly the same
Unfortunatelly, adding the fixed covariates into the model expression
does not change the model at all. Can anyone enlighten me how the
correct syntax should look like? As I am working on a nonlinear
mixed-effects model with cross-classified random effects, I really
want to use nlmer() instead of nlme().
I am very thankful for any advice
Best regards
Marko
--
www.komm.uni-hohenheim.de/bachl
More information about the R-sig-mixed-models
mailing list