In a semi-controlled experiment, seeds were sown in about 20 boxes, associated with 3 types of soil. A few months later, the morphological characteristics of the shoots were measured. We would like to study the effect of the type of Soil on these Morphological characteristics but it appears that there is some variability in these characteristics between shoots sown in different boxes with the same type of soil.

Is it correct to consider this data as nested and analyse it by means of a linear mixed model like:

Morphological characteristics ~ Soil + 1|Box

Or is there any other solution to deal with this Box variable, which is a confounding variable because each Box is only associated with one type of Soil.

  • $\begingroup$ You're talking about nested vs crossed random effects. See this question. $\endgroup$
    – Joe
    Jun 12, 2019 at 14:37
  • 1
    $\begingroup$ @Joe I don't think so. There are only 3 levels of Soil and they are specifically interested in the fixed effect of it. $\endgroup$ Jun 12, 2019 at 14:56

1 Answer 1


I am not sure why you say that Box is a confounder. To be a true confounder, it should be a cause, or a proxy for a cause, of both the outcome (Morphological characteristics) and the exposure (Soil type).

Anyway, from the information given, it seems that you need to account for possible correlations within each box, and a mixed effects model, with random intercepts for Box would be appropriate, as per the example in the OP, provided that there are sufficient shoots per box.

  • $\begingroup$ There are approximately 30 shoots per box so it should not be a problem. I thought Box would be a confounder because it has a significative effect on the Morphological explained variables (ANOVAs performed within each type of Soil) and because each Box is associated with a single type of Soil, thus the variables Box and Soil are sort of linked. $\endgroup$ Jun 12, 2019 at 16:07

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.