I am trying to figure out the best way to model the error using lmer for a randomized complete block design (RDBC) where we measured soil nitrogen weekly for 2 years.
There are: 4 Blocks (A, B, C, D) 6 Treatments (0, 50, 75, 100, 150, 200 kg of N/ha/yr) 4 replicates = 24 Plots (1....24) 50 sampling Dates ConcNO3 is the independent variable

Treatment is the fixed effect, and Plots are nested within Blocks (random). Date can also be considered a random effect.

I am trying to decide between the the following models:

fit1 <- lmer(ConcNO3 ~ Treatment + (1|Treatment:Date) + (1|Date) + (1|Block/Plot), data = df)

Which includes an interaction effect between Treatment and Date

fit2 <- lmer(ConcNO3 ~ Treatment + (1|Date) + (1|Block/Plot), data = df)

Simplified model that does not include the effect between Treatment and Date

Do you think that I am on the right track or do I also need to nest Treatment within Block?


1 Answer 1


This appears to be good. Nesting treatment within block should be equivalent to testing for a treatment*block interaction, which is a hypothesis you could test, just as you can test for a treatment by date interactions. You can test this with AIC or likelihood ratio tests. My preference would be like ratio test via the anova command. I believe p-values for tests of variance components need to be modified (doubled? halved? I can never remember...). REML, not ML, should be used for variance components tests.

With 50 sampling dates modeling a treatment*date interaction might be inefficient; you're allowing each treatment to act differently on every date. On average, over two years, the high and lows of each treatment might cancel each other out resulting in no effect. Do you expect seasonality or an overall temporal trend? This might require random slopes (1+Time|Block/Plot); hopefully not a rabbit hole like a GAMM or time series analysis.

Some random notes: Four blocks is typical for an ecological experiment; however, mixed modelers tend to recommend 8 levels as the minimum number of levels for a random effect.

Perhaps you know this already, but lmer has a very flexible syntax. (1|Block/Plot) should be the same as (1|Block) + (1|Block:Plot).


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.