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:
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?