I am new to mixed-effects models and trying to ensure I understand them appropriately.
I am analysing the results of a 2x2 cross-over intervention study. Essentially, I have 50 subjects who completed two lifestyle intervention programs (program one and program two), with a 6-washout separating the two interventions. The participants were randomly assigned which intervention program they would use first (i.e. group A = program one, then program 2, group B= program two, then 1). Subjects had four visits (visit 1 (baseline 1), visit 2 (after completing the first assigned program), call 3 (baseline 2) and visit 4 (after completing the second assigned program)).
I have two central questions I want to assess:
- Are there differences in my outcome variables between the two different lifestyle interventions (i.e. program one vs program 2)?
- Are there differences between baseline and post within each program (i.e. baseline vs program 1, baseline vs program 2)?
To assess differential changes in outcome variables between the intervention groups at each time point, I considered using linear mixed effect (LME) models. The LME model included time, intervention group, order and a time by-intervention interaction term, with subject ID set as the random effect. Treatment = program 1, program 2 (2 variables) Time = 1,2,3,4 (4 variables) order = AB, BA (2 variables) subject ID, which includes 200 codes, 50 of which are unique (i.e. one unique code per subject).
- lme(outcome~treatment*time + treatment + time + order, random= ~1|subject_id, data= data_all)
If the overall time-by-intervention effect is significant, does that address the first question I have, i.e. there is a significant difference between intervention groups (program one vs program 2)?
Regarding my second question, for those outcomes that did have a significant time-by-intervention effect, is it then appropriate to separate the datasets into the treatment groups (i.e. program 1 dataset with 100 observations and program 2 datasets with 100 observations) and assess differences between baseline visits and post-intervention program visits using LME (now recoded as 1 ( to represent baseline visits 1 or 3) and 2 (post-intervention visits 2 or 4)?
- lme(outcome_variable ~ time + order, random= ~1|subject_id, data = subset_program1)
Any advice would be greatly appreciated!