3

I have the following lmer() syntax:

 lmer(Y ~ A*B*C + COV + A:COV + B:COV + C:COV + (1|A:BLOCK))

where A, B and C are the fixed effects and COV is a continuous covariate. In a manuscript I am writing, I explained that I am using a linear mixed effects model with A, B and C as the fixed effects, COV as the covariate, also used in interactions with A, B and C. I also modelled a random intercept for every observed combination of A and BLOCK to account for variation in blocks. I also list the outputs and lmer model description in the appendix. The reviewer however, want the model to be described in a "conventional way" in the text. I am not 100% sure what the reviewer means by "conventional" but I am assuming he/she refers to the mathematical representation of the lmer syntax above?

Alternatively, I was thinking something along this way (but I am not sure how to add the covariate and the random term, see the "$\dots$"):

$$Y_{ijk}=\mu+A_i+B_j+C_k+(AB)_{ij}+(AC)_{ik}+(BC)_{jk}+ ... +\epsilon_{ijk}$$

I appreciate any help regarding the translation of this lmer syntax.

Stefan
  • 6,431
  • 1
  • Thanks @Livius ! Do you know how to express a nested random term? – Stefan Mar 13 '16 at 04:48
  • Nesting is handled automagically by lme4. The only caveat is that your nested identifiers need to be unique (so if you have 1 through 5 nested in a, b, c, then you either need to rename 1 to 5 as a1 ... a5, b1, ..., b5 etc. OR use the interaction/nesting syntax). The important thing is each level of whatever grouping you assume (whether nested, crossed, whatever) is uniquely named. See 2.2.1.1 in this or the Pastes example in this. – Livius Jun 14 '16 at 06:12

0 Answers0