0
$\begingroup$

Could I please get some advice on coding a linear mixed model for looking at between and within group effect. I have 2 Timepoints (Baseline and 12 weeks Post intervention) and 2 groups (Ex1 and Ex2).

Outcome variable ~ Group*Timepoint + (1|ID) 

I know this will answer the first and second points but I want to run one model so I can answer all three

  1. I want to see if there is an interaction between timepoint and group. (i.e after the intervention did the outcome variable improve more in Ex2 than Ex1).

  2. I want to see if regardless of group did my outcome variable change after 12 weeks

  3. And finally (this is part I am struggling with), within each group did my outcome variable change from Baseline to 12 weeks post?

Outcome variable ~ Group*Timepoint + (1+Timepoint|Group)

OR

Outcome variable ~ Group*Timepoint + (1+Timepoint|Group/ID)
$\endgroup$
4
  • $\begingroup$ In your 3rd point, when you say "within each group", do you mean within each Group , or with each ID ? From the wording of point 3 it seems you mean within each Group but the title of the question says it's within "subject" - that is, within ID. Please clarify. $\endgroup$ Commented Feb 23, 2021 at 14:36
  • $\begingroup$ My apologies, I mean within group. I will edit the title to say 'group' $\endgroup$
    – Dani
    Commented Feb 23, 2021 at 21:53
  • $\begingroup$ OK but the first paragraph says "between and within subject effect". So is it between/within subject AND group ? $\endgroup$ Commented Feb 24, 2021 at 10:35
  • $\begingroup$ @RobertLong Apologies again, first time posting a question, I am not interested in the within/between subjects only with the within/between group effect.I have also edited the question $\endgroup$
    – Dani
    Commented Feb 24, 2021 at 21:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.