Home › forums › Mixed Models › trouble when re-running (G)LMM
Tagged: 'afex' 'mixed' 'convergence'
- This topic has 2 replies, 2 voices, and was last updated 3 years, 4 months ago by
lenurix.
-
AuthorPosts
-
-
May 30, 2020 at 13:49 GMT+0000 #414
lenurix
ParticipantDear Henrik,
thank you for the awesome package and the tutorials an RT analyses you provided.
I used afex to analyse data from a mental rotation experiment where I tested 2 groups with 2 conditions (same vs mirrored) at 7 angular disparities. As fixed effects I entered group, trial type (same vs mirrored), angular disparity as.factor(0, 30, 60, 90, 120, 150, 180°), and their interaction terms into the model, as well as gender and age (which I centered first) and their interaction terms with group. As random effects, I had intercepts for subjects and items, as well as by subject random intercepts and slopes for the effects of trial type, and angular disparity, and their interaction.This is the formula that I used:
Model: corr ~ group * cond * degrees + gender + centerage + gender:group +
Model: centerage:group + (degrees * cond || subject) + (1 | tar.info)There were no convergence or singularity warnings when I ran this model. I saved the model and when I load it no warnings pop up:
Mixed Model Anova Table (Type 3 tests, LRT-method)
Model: corr ~ group * cond * degrees + gender + centerage + gender:group +
Model: centerage:group + (degrees * cond || subject) + (1 | tar.info)
Data: ds.data
Df full model: 47
Effect df Chisq p.value
1 group 1 0.14 .713
2 cond 1 9.53 ** .002
3 degrees 6 81.69 *** <.001
4 gender 1 0.15 .703
5 centerage 1 1.63 .202
6 group:cond 1 3.09 + .079
7 group:degrees 6 7.61 .268
8 cond:degrees 6 29.85 *** <.001
9 group:gender 1 0.04 .843
10 group:centerage 1 0.16 .694
11 group:cond:degrees 6 8.99 .174
—However, when I now re-run the analyses with the same code, I get singularity warnings. Now I do not know whether I can trust the initial model, since I cannot replicate the results.
A similar thing happened with the RT analyses, where I saved the model that seemed to have converged fine:
Mixed Model Anova Table (Type 3 tests, S-method)
Model: log(rt.raw) ~ group * cond * degrees + gender + centerage + gender:group +
Model: centerage:group + (cond * degrees | subject) + (1 | tar.info)
Data: ds.trimmed
Effect df F p.value
1 group 1, 34.57 5.39 * .026
2 cond 1, 40.08 97.40 *** <.001
3 degrees 1, 39.87 268.96 *** <.001
4 gender 1, 35.90 2.31 .138
5 centerage 1, 35.90 0.58 .449
6 group:cond 1, 40.08 4.86 * .033
7 group:degrees 1, 39.87 1.08 .304
8 cond:degrees 1, 39.71 62.32 *** <.001
9 group:gender 1, 35.90 0.14 .710
10 group:centerage 1, 35.90 1.34 .254
11 group:cond:degrees 1, 39.71 3.19 + .082… which now does not converge anymore. I also have similar analyses for a very similar experiment where I can perfectly replicate the results. I am in a bit of a loss here and would appreciate any help.
All the best,
lena -
May 30, 2020 at 14:36 GMT+0000 #415
henrik
KeymasterWithout additional information it is difficult to say what the issue is here. It might be that in the original fit you used an older version of
lme4
and they have changed some optimizer settings. But it seems unlikely that an older result was more reliable than one from the current version. In other words, if with the recent version you get different results I would probably trust those recent results more.You might try to set
all_fit = TRUE
to see if that helps. And in the second model you might want to remove the correlation as you do in the first model.One more comment, usually one only enters variables one wants to adjust for (i.e., gender and age) only as main effects. I am not sure if the interaction of those with group is a good idea.
-
May 30, 2020 at 15:52 GMT+0000 #416
lenurix
ParticipantDear Henrik,
thank you so much for your prompt reply. I will try out your sugestions and get back to you.
Thank you for your help!
-
-
AuthorPosts
- You must be logged in to reply to this topic.