I have an experiment with two fixed factors (repeated 2 x 2 design)

  • Between-factor: Treatment Group vs. Control Group (TREAT)
  • Repeated-factor: Pre-Treatment vs. Post-Treatment (TIME)

The dependent variable in the Scenario is depressiveness (questionnaire score 0-45). We are interested in the interaction, in such that only patients in the Treatment Group should improve, resulting in less Depression at Post-Treatment.

Now I add one additional factor resulting in a slightly different / extended scenario. Usually every patient fills out one questionnaire before Treatment (Pre-) and after Treatment (Post-). In this new Scenario, however, we assess Depression 5 times at Pre- as well as 5 times at Post- Measurement. We do this in order to increase measurment precission / reduce error within each subject. (This method is called ecological momentary assessment (EMA), usually assessed automatically by the mobile phone).

Here is my question: How can I use this new Information optimally? Are both strategies (A and B) applicable?

A) Different slopes for each Patient? Here, we would calculate the average of the 5 Pre-Measurements as well as the average of the 5 Post-Measurements. This reduces the error within each subject. Next we can specify a model which accounts for the interaction plus one random effect for different slopes for each participant:

lmer(Depression ~ TREAT*TIME + (TIME|Patient), dataset)

B) Nesting the 5 Pre- and the 5 Post-Measurements within the repeated factor (TIME)? Instead of taking the average of 5 measurements (as in Option A), we would like to construct 5 different slopes within each Patient (connect Pre1 with Post1, Pre2 with Post2, Pre3 with Post3 and so on). Is this possible by Lmer? Do we violate something, if we do this? How would the command look like?

lmer(Depression ~ TREAT*TIME + (5 Measurements[?] | TIME [?]), dataset)

"Bonus" question: Is it even possible to combine both perspectives? Maybe in a scheme close to this?

lmer(Depression ~ TREAT*TIME + (TIME|Patient) + (5 Measurements[?]|TIME [?]), dataset)

I'm now posting here, as I changed computers and stack doesnt recognize me any more. Yes thats true, we increased power as expectable by definition. And thats a good point, that more sophisticated models come at the price of complexity. However, can you think of any other method except averaging the 5M's that could lead to increases in power?

@ your comment from below: I think thats the problem. There is no predictive value it seems (horizontal line in the drawing) but only a reduction of the error term.

enter image description here

  • $\begingroup$ I understand you are using repeated measures, but is the change over time something that you have an interest in or is possible serial correlation just a nuisance in your study design? Also, why not subtract pre X from treat X and plot that for your question two? $\endgroup$
    – JWH2006
    Jun 13, 2018 at 13:08
  • $\begingroup$ Dear JWH, thanks for your comment! Basically we are conducting a Simulation. We want to know if adding multiple Pre- and Post-Measures increases power. It does so for ANOVA and ANCOVA. We simply averaged 5 Pre as well as 5 Post measures and feed it into the An(c)ova). Next, we were looking for a more sophisticated method, because we assumed that we would loose Information if we simply average the 5M's. $\endgroup$ Jun 13, 2018 at 14:43
  • $\begingroup$ Can you elaborate more deeply on your Suggestion? Is "pre X" the average of all 5 pre-measures and "treat X" the average from Pre- to Post for each Patient? $\endgroup$ Jun 13, 2018 at 14:45
  • $\begingroup$ What we basically would like to do, is to take the error variance within each subject and split it into two parts: The variance within the 5 pre (M5) or post measures (M5), and the Variance within each subjects Pre and Post measure (Variance PP). Next we would like to substract the variance M5 from variance PP in order to optimize the F-Value for the interaction (MS treat x time divided by MS error within the subject). However, as you see, the idea is very vague and may simply be wrong. $\endgroup$ Jun 13, 2018 at 14:54
  • $\begingroup$ by very definition, you would have equal to or greater statistical power through repeated measures rather than taking an aggregate score. Only under perfect intraclass correlation would repeated measures not offer any benefit in terms of power compared to an aggregate. But yes, you lose information but you also increase model complexity. $\endgroup$
    – JWH2006
    Jun 13, 2018 at 15:22

1 Answer 1


Model A makes a lot of sense, but you should include a random intercept also. Of course it would also be nice if you could validate the assumption that the time effect (slope) is linear.

Model B would be (factor(TimeIndex) | Patient) if I understand you correctly - instead of a linear effect of time you assume that the treatment effect is linear in time but that the non-treatment-related treatment effect could have any shape. It strikes me as a weird assumption that the shape of the time effect is the same in the two periods unless it is a repeated cycle, say Saturday morning paired with Saturday moring.

  • $\begingroup$ Hallo Helene, thanks for your very fast reply! We just tried your advise with the random intercepts included in our little data Simulation Project (A). As it seems this LMM Approach worked, but it did not outperform ANCOVA in terms of increases in power. As for Topic B) I think you are totally right, as we seem to have a knot in our Approach. At the Moment it seems most promising to simply take the average of all 5 Pre- and all 5 Post-Measurements and cancel out the error within each subject. $\endgroup$ Jun 13, 2018 at 14:22
  • $\begingroup$ Our Intuition was that we could use LMM to explain additional error variance within each subject by specifying an additional random factor within each participant. However, this seems to be the wrong direction, as the random effect usually is on higher Levels in the model (e.g. effect of 5 different clinics; effect of 5 different therapists) [?]. $\endgroup$ Jun 13, 2018 at 14:27
  • $\begingroup$ and not (deeper) within one participant. So the F-Value for the interaction is MS(time x interaction) / MS error (within subj) - in this case we do not improve the numerator (better predict), but reduce the denominator (less error) [?] $\endgroup$ Jun 13, 2018 at 14:46
  • $\begingroup$ I would think that there would be some value in knowing the correlation of the random slope of time and random intercept. BTW, where is the intercept centered? $\endgroup$
    – JWH2006
    Jun 13, 2018 at 15:26
  • $\begingroup$ Hi JWH, in the lme4 implementation, the random intercept is centered at 0 so to avoid that restriction you need a fixed intercept also. This is in the model by default, unless you remove it by specifying a (-1) term. $\endgroup$ Jun 14, 2018 at 1:05

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.