Skip to content
Prev 6781 / 20628 Next

Random slope models with nested random effects and multiple x variables

Dear Sam,

You could model lmer (behaviour ~ (1|bird:track) + (a+b+c|bird)) which allows covariates among all 4 random effects (the random intercept and 3 random slopes). Thus you get a 4x4 variance-covariance matrix.

The other extreme is lmer (behaviour ~ (1|bird:track) + (1|bird) + (0 + a|bird) + (0+b|bird) + (0+c|bird)) where all random effects are indepent. Hence one could write is as a diagonal 4x4 vraiance-covariance matrix.

Note that lme from the nlme package allows for more structures in the variance-covariance matrix. I would have a look at it unless you need generalised linear mixed models or crossed random effects.

Best regards,

Thierry