[R-sig-ME] random intercept, random slope plus intercept, no random slope alone?
Mathew Vickers
vicker@@m@thew @ending from gm@il@com
Tue Aug 14 11:40:34 CEST 2018
Dear all,
I measured running speed of 70 individual lizards. The lizards were
siblings born of 7 mothers, 10 offspring each. The Lizards ran at 3
different temperatures, A, B, and C, where A < B < C, and I recorded how
fast they ran.
I want, particularly, to examine whether a given lizard running speed of a
lizard increases, is static, or decreases. I want to know if there is
consistency (or not) in this effect between the 7 maternal lines.
The models I have now are:
m1 <- gls(speed ~ (clim + mum)^2, data=mydf, method="ML")
# fixed effects only
m2 <- lme(speed ~ (temperature + mum)^2, random=~1|LizardID, data=mydf,
control = lmeControl(opt = "optim"), method="ML")
# random intercept model (i.e., one intercept of running speed~temperature
per individual, nested within mother, a common slope per all individuals
within mother )
m3 <- lme(speed ~ (temperature + mum)^2, random=~1+mum||LizardID,
data=mydf, control = lmeControl(opt = "optim"), method="ML")
# random intercept and slope model (i.e., one slope and one intercept of
running speed~temperature per individual, nested within mother )
m4 <- lme(speed ~ (temperature + mum)^2, random=~0+mum||LizardID,
data=mydf, control = lmeControl(opt = "optim"), method="ML")
# uncorrelated random slope and intercept - same as last, but slope and
intercept are uncorrelated.
anova(m1, m2, m3, m4)
# this should tell me which model is the best, using AIC or loglik in
combination with the p-value.
Are all of these models and my understanding right?
What I really want to test is random slope among individuals nested within
mother. As I see this set of models, it appears that I can test random
intercept alone, and compare it to the random intercept and slope model,
but I cannot test random slope alone. Is that true, or is there a model
formulation I am missing to test only slope of running speed per individual
nested within mother?
And one other question:
Given that I am particularly interested in the questions: a) is the slope
different among individuals, and b) is the slope more consistent within
mothers than between mothers, do I need this kind of model selection?
Thanks heaps,
Mat.
--
Mathew Vickers
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list