I have an issue I cannot solve myself and hope I can get some pointers here:

I have a RCB design with 10 tree species each replicated 5 times in 5 blocks. I classified all species according to their height and assigned them to 3 groups (A, B and C). Then, I chose 2 species from each group and take my measurements on 8 individuals of that species, making sure to get at least one individual from each block. That gives me sample size of 48. In the end I want compare the groups with each other. Then I take a measurement for each individual in autumn, winter and spring and call this variable 'season'.

My hypothesis is that the groups are different with respect to the measurement I took, as well as the season will change the outcome of the measurement, e.g. the measures will be 'ideal' in autumn, ' very low' in winter and 'high' in spring.

My data looks similar to this made up example:

mydat<-data.frame(species=rep(1:6, 3, each=8),
                        block=rep(sample(1:5,replace=T,8), 18),
                        group=rep(as.factor(sample(LETTERS[1:3],48, replace=T)),3),

Here is the model I fit:


But I guess this is not 100% correct, since I cannot treat block as a random factor in aov(), can I? How can I proceed here? I tried to do it with lmer but I don't really understand what I am doing there. I know how do add the random term but how can treat the season now as a repeated measures, so that I get the right total degrees of freedom of 47? Also can I run TukeyHSD() on a lmer model afterwards since I'd like to compare the means.

Thanks for any help!!


1 Answer 1


You may find the following links helpful

Repeated Measures ANOVA using R

and Repeated Measures Analysis with R


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.