I know there have been a number of posts on lmer, but I am struggling to find my answer through research and am hoping to get your help.

I am analyzing data from a study with the following data:

1) Score = the DV, a participants score on a given test.

2) Test = IV, within-subjects variable. Tests were taken at 4 different time points--1 pre intervention and 3 post intervention tests. Not all participants completed all 4 tests.

3) Group = between-subjects variable, subjects were assigned to either an intervention or control group.

4) Resistance = a covariate that may explain why intervention was more/less effective in a given participant.

I want to know whether Score varies as a function of Group across tests. I'd also like to know whether Resistance modifies the change in test scores moreso for the intervention group than the control (so, a three way interaction, I think?).

Seriously, any help, advice, links to resources would be incredibly useful.


In lme4 syntax you could write the model as

lmer(Score ~ Test + Group * Resistance + (Test | Subject))

(Assuming of course that linear models' assumptions are not violated, and that the residuals of the model have are normally distributed.)

For more info on lme4 syntax see Table 2 here, or this well-done blog post.

  • $\begingroup$ Thank you for your help! I had seen the paper before, but had not seen the blog post yet. $\endgroup$
    – Tom
    Nov 21 '19 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.