1
$\begingroup$

I'd appreciate some advice specifying a mixed effects model using the lme4 package in R.

I have pre-, post-(1 month after the pre-assessment), and follow-up (3 months after the pre-assessment) measurements on 120 participants. The participants were randomly assigned to either the control or intervention group.

My hypotheses are that the intervention group will have a significantly lower cigarette consumption per day (CPD) compared to the control group at both (1) post-assessment and (2) follow-up.

My idea was to structure the data like this: enter image description here

The outcome variable (CPD_diff) is predicted by dummy codes of time, group allocation, and their interactions. I created time dummies to reflect the differences between the baseline and post-training (t1, coded as 0, 1, 0 for the baseline, post-training, and follow-up) and between the baseline and follow-up (t2, coded as 0, 0, 1). I also dummy coded group allocation (1 = Intervention; 0 = Control). I assumed that time effects vary across the group (i.e., cross-level interaction) and participants (i.e.,random effects).

In R, I would code it like this:

m1 <- lmer(CPD_diff ~ 1 + group * (time_t1 + time_t2) + (1 + time_t1 | subject) + (1 + time_t2 | subject), data=data, REML=F)

Is this model appropriate given the data structure and the question I am trying to answer?

$\endgroup$

1 Answer 1

1
$\begingroup$

Check diagnostic plots to see if CPD behaves in a way that linear models support. If so, I would use generalized least squares with an unstructured covariance matrix instead of using random effects. If diagnostic plots reveal a problem such as a floor effect of CPD or non-normality of residuals, consider ordinal longitudinal models, either Markov or random effects models as exemplified here, which also covers generalized least squares.

$\endgroup$

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.