I am trying to analyse a split plot design for a plant growth experiment with these variables:
- Biomass (dependent variable)
- Transect (sub plot factor with three levels)
- Treatment (main plot factor with two levels)
- Block (2 blocks in total, serving as replicates of the treatment)
- Location (multiple locations within each transect point)
I know what the random effect structure should look like. However, I can’t work out how to write this in R script. Could someone please help me? It’s probably very easy, but I have been looking for hours and hours and can’t find it.
Random effects should be:
- Block
- Interaction Block and Treatment
- Location nested within Transect
- (Location nested within Transect), interaction with Treatment
So perhaps something like:
(1|block) + (1|block*treatment) + (1|location:transect) +
(1|(location:transect)*treatment)