I am looking for help to create a model for the following data:

I'd like to understand if the abundance of a certain microbial group (dependent continuous variable QUANTITY) found in soils is been affected by land-use, seasonality and their interaction. For each land-use (factor LAND-USE with 2 levels: forest and pasture), I have 3 different sites (factor SITE with 6 levels: F1, F2, and F3 for FOREST and P1, P2, and P3 for PASTURE). At each site, I collected soil samples in 5 points (factor POINT). Therefore, POINT is nested in SITE and SITE is nested in LAND-USE. In the end, I have 5 points per site and 15 per land-use, totaling 30 points in the study. However, each point was sampled twice (factor SEASON with 2 levels: DS and RS), during the dry and rainy seasons.

My dataframe looks like this:

DS FOREST F1 F1_1 300.00  
DS FOREST F1 F1_2 330.00  
DS FOREST F1 F1_3 530.00  
DS FOREST F1 F1_4 670.00  
DS FOREST F1 F1_5 80.00  
DS FOREST F2 F2_1 600.00  
DS FOREST F2 F2_2 630.00  
DS FOREST F2 F2_3 780.00  
DS FOREST F2 F2_4 900.00  
DS FOREST F2 F2_5 1,000.00    
RS PASTURE P3 P3_1 800.00    
RS PASTURE P3 P3_2 730.00  
RS PASTURE P3 P3_3 980.00  
RS PASTURE P3 P3_4 550.00  
RS PASTURE P3 P3_5 700.00  

I am not interested in the site or point itself. I just need to know the effects of land-use and seasonality. However, I am not sure how to code site and point in the error term using AOV.

For example, what's the difference in the following codes? I know this is a very basic question, but even after reading a series of tutorials, I still do not understand which one I should choose in this case.

aov(QUANTITY ~ Season * Land-use + Error(Site), archaea)  
aov(QUANTITY ~ Season * Land-use + Error(Point), archaea)  
aov(QUANTITY ~ Season * Land-use + Error(Site/Point), archaea)  

I would appreciate any advice. If there is anything that I should clarify, please let me know!

  • $\begingroup$ The term 'use" is not clear to me. Further, what is the purpose of your study - season or use (or combined effect). Also, I can not understand "use " - is it use as pasture or intensity of pasture ? How do you quantify season for the analysis proposed. $\endgroup$
    – user10619
    Apr 3, 2019 at 0:54
  • $\begingroup$ Hi Subhash! My purpose is to understand the effect of season, land-use, and their interaction. I wrote "Use" in the model, but it's actually the variable "Land-use", with the levels forest and pasture. I am not studying the intensity of pasture itself, only both systems. $\endgroup$
    – Biomol
    Apr 3, 2019 at 1:18
  • $\begingroup$ I am not sure what you meant with "How do you quantify season for the analysis proposed". Can you explain to me? $\endgroup$
    – Biomol
    Apr 3, 2019 at 1:19
  • $\begingroup$ @Biomol: First, please add new information to the original Q as an edit, so all information is in one place. That will increase the probability of a good answer. Second: For season, it is continuous or a factor? Which values can it take? 1,2,...,12 for month, say, or "spring", summer", ... ? Same for other variables. $\endgroup$ Apr 3, 2019 at 11:49
  • $\begingroup$ Thank you @kjetilbhalvorsen. I made all the alterations in the original text. About season, it's a factor with two levels (DS and RS). All other independent variables are factors too. $\endgroup$
    – Biomol
    Apr 3, 2019 at 13:33

1 Answer 1


This looks like a split-plot design, see for instance Split Plot Design? lmer analysis or Can I test the effect of Block in a split plot design in R?. The modern way to analyze this in R is to use the package lme4, although if your design is perfectly balanced aov might work.

Since you have Point nested within Site, the correct specification should be the analog of your third one:

lme4::lmer(QUANTITY ~ Season * Land-use + (1 | Site/Point), 

where the term (1 | Site/Point) means a random constant for each Site, and for Point within Site. This will give correct estimates also in the case of unbalanced data, something aov will not.

If you will post your data I will have a look.


Your Answer

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

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