Skip to content
Prev 6818 / 20628 Next

longitudinal analysis of nested samples

Dear Giancarlo,

You will need to have a look at your data. Since you claim that TR has 4 levels but the model output indicates only one (Number of obs: 560, groups: TR, 1).

The trees are nested within point. Therefore a more likely model is lmer(V ~ YR + (1|PT/TR), data=TREES) or lmer(V ~ YR + (1|PT) + (1|PT:TR), data=TREES) Both models are identical, the second is a bit more verbose but more clear. If the points are nested within transects then you can simply add it to the model: lmer(V ~ YR + (1|Transect) + (1|Transect:PT) + (1|Transect:PT:TR), data=TREES)

These are models with only a random intercept. You can add random slopes as well. E.g. if you want a random slope along year at the tree level:
lmer(V ~ YR + (1|Transect) + (1|Transect:PT) + (1 + YR|Transect:PT:TR), data=TREES)

Best regards,

Thierry