I have a longitudinal mixed-effects regression comparing change in depression between two timepoints across 12 groups. I'd like to know if the control group is significantly less effective in reducing depression than the average of the other 11 groups. The model to compare each group to each other looks like this:
m1_phq9 <- lmer(phq9_score ~ time * group + (1|pid),data=df)
Would this solution work?
df<- df %>% mutate(passive_vs_all=ifelse(group=='passive','trout','active') %>% factor %>% fct_rev())
m2_phq9_all_vs_passive <- lmer(phq9_score ~ time * passive_vs_all + (1|group/pid),data=mega_alltimes)
I'd appreciate any insights on setting up the contrast for this kind of model in R.