I've constructed some LMEMs that use dichotomous variables and their interactions as regressors, and I've become confused by the output. When I only assess a single interaction, using the code below (which is the approach provided by my statistical training), lme4 performs a Type III Wald F test:
value3 <- lmer(neurosynth_value ~ contrast*Teen_vs_Adult + (1 | participant_id),dCon)
Anova(value3, type= 3, test = 'F')
The output looks like this, which is exactly what I want:
Analysis of Deviance Table (Type III Wald F tests with Kenward-Roger df)
Response: neurosynth_value
F Df Df.res
(Intercept) 5.9460 1 328.06
contrast 5.9198 1 511.34
Teen_vs_Adult 3.4148 1 329.88
contrast:Teen_vs_Adult 1.5901 1 509.75
Pr(>F)
(Intercept) 0.01528 *
contrast 0.01531 *
Teen_vs_Adult 0.06551 .
BUT when I add an additional dichotomous regressor and its interactions, the Anova function changes methods to perform a Type III Wald Chi-Square? That code and results are below.
Code:
valuecon1 <- lmer(neurosynth_value ~ contrast*valence*Teen_vs_Adult + (1 | participant_id),dConValue)
Anova(conflictcon1, type = 3, Test = 'F')
Output:
Analysis of Deviance Table (Type III Wald chisquare tests)
Response: neurosynth_conflict
Chisq Df Pr(>Chisq)
(Intercept) 95.4341 1 < 2.2e-16 ***
contrast 16.9597 1 3.818e-05 ***
valence 4.0655 1 0.043768 *
Teen_vs_Adult 32.8155 1 1.013e-08 ***
contrast:valence 8.0806 1 0.004474 **
contrast:Teen_vs_Adult 10.6639 1 0.001092 **
valence:Teen_vs_Adult 2.4147 1 0.120200
contrast:valence:Teen_vs_Adult 6.2718 1 0.012268 *
Does anyone know why this is?
car::Anova
than lme4. $\endgroup$car::Anova
. I'm not sure if the package has been updated since my training, but the code should readAnova(conflictcon1, type = 3, test.statistic = 'F')
test.statistic can also be set to 'chisquare' $\endgroup$Anova(conflictcon1, type = 3, Test = 'F')
. If you had used a lower case "t", R would have partially matchedtest
totest.statistic
. $\endgroup$