I am working with trees that were fertilized in a full factorial design (N x P x K) in plots that are replicated four times. I currently have a mixed effects model with this structure:
> library("nlme")
> model <- lme(growth ~ P*N*K, data=Lars_noNA, random=~1|rep/block/plot4040)
> summary(model)
Where rep
= replicate, block
is part of the blocking layout, and plot4040
is a plot that received a nutrient treatment. Now I want to growth by individuals measured multiple times over 15 year and but I don't know if this is the way to handle the error associated with the repeated measures.
>library (nlme)
>model <- lme (AGBnew ~ P*N*K+year, data=mydata_sorted1,
random=~1|rep/block/plot4040/individual/year)
>summary(model)