I have data from two groups (divisions) of participants that consider attention lapses. The question is, first, do the number of attention lapses change over the two testings, and second, do the divisions differ in attention lapses. I tested this applying this code lmer(attention_lapses ~ testing_session + division + (1|id), data=data)
And for the post hoc group comparison in each testing session emmeans::emmeans(my_model, pairwise ~ division | testing_session)
As you can see from the figure , the group variances do differ quite some. Then, are my results correct when lmer assumes equal variances between the groups (or does it)? In addition, I applied lme to model different group variances, and based on ANOVA the second model (b) fit was better.
a <- lme(over_500ms ~ testing_session + division, data = PVT, random = ~1|id)
b <- lme(over_500ms ~ mittauskerta + division,
random = list(id = pdDiag(form = ~ division)),
weights = varIdent(form = ~1 | division),
data = PVT)
The problem is that I do not quite understand what the model b specification implies. Therefore, can I trust the results of the first lmer-model? In each case, the results are similar tho. Significant group differences on both testing sessions and no within-group change in attention lapses over the testing sessions.