Sorry for what might be an obvious question, but I have a question about an experimental design for which I can create a "mouse" analogue: I have 270 mice. I have 2 treatments (factors)-- L and S (2 types of vitamin, each with 3 levels). I apply the treatments such that there are 9 groups of 30 mice, each group of 30 gets 1 factor level combination, i.e., L1S1, L1S2, ... L3S3. So one replicate of my experiment requires 9 experimental units, 30 replicates --> 270 experimental units. Fine. Next, on each of these mice, we apply each level combination of 3 additional treatments (drugs) (d (3 levels), m (4 levels) and a (2 levels). So dXmXa 3X4X2=24 treatment level combinations. One day we apply d=1,m=1,a=1 levels of the 3 drugs to each of the 270 mice, and measure their heart rate. Next day we apply d=1,m=1,a=2, we measure their heart rates, etc. until we've done our 24 days, and have 270 * 24 or 6480 total measurements of heart rate. The goal of my experiment was to understand the effects of the treatments independently, and 2-way interactions. For instance are the effects of d, m, or a mediated by level of L, or LXS interactions. Also, does d have a bigger impact on heart rate than m under different LS combinations, etc. etc.

It sounds like a factorial design, it sounds like repeated measurements (each mouse gets all of the dma treatment combinations applied to it). I'd like to analyze it with a mixed effects model; it sounds like random effects are from the replicate, as there are repeated measurements on the same experimental unit.

It has been some 30 years since I have had an experimental design class, and I am stumbling around on the Internet trying to figure this out. Can anyone point me in the right direction? Any suggestions for the form of the lme model in R? Thanks for any advice! Andrew


1 Answer 1


Yes, it seems that you have a repeated measures factorial design.

So there are repeated measures within mice so we would want to fit random intercepts for mice since measurements within mice are likely to be correlated

The mice are grouped into 30 replicates of 9 and so we would also want to fit random interecepts for replicate, since measures within the same replicate may be correlated. If the variance component for replicate is close to zero or the model converges with a singular fit warning then you can remove replicate from the random effects

We can also say that any individual mouse belongs to one and only one replicate. Hence mice are nested in replicates.

Such a model can be fitted with lme from the nmle package using:

lme(Y ~ L + S + d + m + a, random = ~  1|replicate/mouseID, data = mydata)

or with the newer packages such as lme4 and other, the standard syntax would be

Y ~ L + S + d + m + a + (1|replicate/mouseID), mydata

You can then add the interactions that you are interested in.

  • $\begingroup$ Thanks for your response! So there is no issue associated with L1S1,L2S2,... L3S3 treatment combinations leads to 9 groups of 30 experimental units, but to each of the 30 members of each group, we apply EVERY combination of dma? i.e., the repeated measurements are of combinations of dma, but each of the 9 LXS combinations are not applied to each of the 270 units, only to the ones in their group of 30. See what I mean? Each dma combo is applied to each mouse, but each LXS combination is applied to only only 1/9 of the mice. Is your response the same in this case? Thanks again! $\endgroup$
    – alister
    Aug 3, 2020 at 15:37
  • $\begingroup$ Trying to get my little brain around this ;) Are you sying that there is some form of blocking here ? $\endgroup$ Aug 4, 2020 at 11:20
  • $\begingroup$ Hi! I think I know what it is -- a split plot design. I think L and S are whole plot factors, and the mice are the subplot, with the d,m and a treaments as the subplot factors. t $\endgroup$
    – alister
    Aug 5, 2020 at 12:27
  • $\begingroup$ Hi! I think I know what it is -- a split plot design. I think L and S are whole plot factors. At the subplot level, normally there'd be a random assignment of mice to a level of a factor. However, every mouse gets every level of the factor, hence repeated measurements. So I need an error term for the whole plot error, and an error term for the repeated measures at the subplot.. Somehow! Yijklpqr = μ + Li +Sj +LSij + εl(ij) + LSdmaijpqr (all combos) + εl(ijkpqr) where l=1-30 reps, i=1-3 levels of L, j=1-3 levels of S, p=1-3 levels of d, q=1-4 levels of m,r=1-2 levels of a. Maybe? Is l 30? $\endgroup$
    – alister
    Aug 5, 2020 at 12:59
  • $\begingroup$ Take a look at this and see if you can apply it to your situation. Basically we have to account for all the "levels" of error in the design. It certainly seems more complicated than in my answer (as it stands) but I'm not sure if it's as complicated as in your last comment (though it could be!). I find it quite hard to get my head around these kinds of designs sometimes, when it's not my own study ! $\endgroup$ Aug 5, 2020 at 13:04

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.