So I've done a lot of reading and chatting to people and I have a solution.
My experimental design is a split plot design, which is quite different from a nested or hierarchical design. I was originally confusing the terms. As Robert correctly states in his answer, what is needed is a mixed effects model. Thus:
Fixed effects: Year, Treatment1, Treatment2
Random effects: Year, Block, Treatment1
The model is specified thus:
mod<- lmer(Richness~Treatment1*Treatment2*Year+(1|Block/Treatment1)+(1|Year),data=dat,poisson)
The fixed effects are the terms specified in the brackets. Since none of these are continuous (the effect of Year doesn't necessarily increase each year in a linear fashion so I have classed it as a categorical fixed effect), they are specified 1|fixed effect, where 1 represents the intercept.
If Block were actually a continuous fixed effect (obviously hypothetical!) then the fixed effects might be specified +(Block|Treatment1)+(1|Year).
The model can then be simplified as appropriate.
Several things to note:
1) When specified as a random effect, Year is listed separately from Block and Treatment1, since it doesn't have an intuitive "level" at which to be nested between them (Year isn't any different at any plot size of the experiment: for every block, plot and subplot Year is the same.
2) Treatment 2 does not need to be specified as a random effect since it represents the highest level of replication in the experiment and therefore will not be psuedoreplicated
3) In mixed effects models it is possible to specify an error distribution if errors are not normal. I have specified poisson here, since my response data are counts - this improved the distribution of the model residuals.
I try to answer, or at least give hints, to those questions I feel a little bit familiar with. I'm no statistics expert, but this is what I understood so far about longitudinal data analysis and growth models using lme4.
I found this page quite helpful to decide how to specify the formula depending on the design. Your random part would probably look like (1 + time | Block/PlotID)
- however, I'm not sure if you even would want to include the interaction in the random parts as well.
Maybe these link are also helpful:
Question 2)
For repeated measure (or growth models), time should be included as fixed and random factor.
Question 3)
If you use time as factor, you may get an error (like number of observations <= number of random effects or so). In such cases, use argument control = lmerControl(check.nobs.vs.nRE="ignore")
in your lmer
-call. See this post for more details. For more than two or three time points, I would include time as numeric.
Question 4)
What do you exactly mean by that? You have to transform your data into long format, thus having a subject-ID-variable which repeats its values for each time point (i.e. each subject is represented max. once per time points).
Best Answer
In your model
Rotation
is both a fixed effect slope and a random effect nested inBlock
in here:(1|Block/Rotation)
. If you wantedRotation
to be a random slope inBlock
you would have to define it as(1 + Rotation|Block)
. What(1|Block/Rotation)
means is:(1|Block) + (1|Block:Rotation)
, i.e. a random intercept forBlock
and a random intercept forRotation
nested inBlock
.Check also this post on SO or here. More information on defining models in lme4 you can find in an article by Bates et al. (in press) or in this online book.
Btw, why you don't want REML method for estimation?