2
$\begingroup$

I am trying to write a model for an experimental design that looks like this:

There are 5 farms (A,B,C,D,E) , and each farm has a RCBD design with 2 treatments(1,2) randomized in 4 blocks in each farm. Repeated measurements of response are taken from each treatment at 4 dates.

I want to test the fixed effects of treatment and time with their interactions. I have trouble specifying the random effects for this model.

m1 <- lmer(response ~ treatment * time + (1 | farm) + 
             (1|farm: block) + (1 | farm :block: treatment))

For a separate model if I decide farms, treatment, time and their interactions as fixed effects, I write the following:

m2 <- lmer(response ~ farms * treatment * time + (1|farm: block) + 
              (1 | farm :block: treatment))

The question is how do I factor the correlated errors for time into these models?

$\endgroup$
2
  • $\begingroup$ What is the purpose of the repeated measurements ? Are you interested in the change over time, or something else ? What is the time between measurements ? $\endgroup$ Nov 15, 2023 at 20:21
  • $\begingroup$ @RobertLong, yes, the change over time. The time between each measurements are roughly 1 month apart. $\endgroup$
    – Rabin KC
    Nov 29, 2023 at 16:55

1 Answer 1

2
$\begingroup$

So far more of a comment, but too ong for comment box: For your first model, the last model term

(1 | farm :block: treatment)

seems in reality an error term (block/treatment interactions is usually seen as error) so could be omitted from the model.

For the second model, the fixed effects farms * treatment * time will eat all of the degrees of freedom, so leaving nothing for the random effects or error variance. That model is overparametrized. It also looks strange to include farm as a fixed effect, in such designs mostly farm is seen as a sample of a larger population of farms to which you want to generalize the conclusions, as such it is used as a random effect.

To say more about how to model time correlations, you need to tell us if you treat time as numerical or simply as a factor.

$\endgroup$

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.