9
$\begingroup$

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?

$\endgroup$
3
  • 1
    $\begingroup$ It's more likely this is an issue with car::Anova than lme4. $\endgroup$
    – JTH
    Commented Jun 24, 2021 at 23:20
  • 1
    $\begingroup$ I actually figured this out already, but I'm leaving this up for posterity. @JTH is right --- the issue was with car::Anova. I'm not sure if the package has been updated since my training, but the code should read Anova(conflictcon1, type = 3, test.statistic = 'F') test.statistic can also be set to 'chisquare' $\endgroup$ Commented Jun 24, 2021 at 23:27
  • 1
    $\begingroup$ Ha, now I see it: notice the capital "T": Anova(conflictcon1, type = 3, Test = 'F'). If you had used a lower case "t", R would have partially matched test to test.statistic. $\endgroup$
    – JTH
    Commented Jun 24, 2021 at 23:32

1 Answer 1

5
$\begingroup$

It's not

Anova(conflictcon1, type = 3, Test = 'F')

but rather

Anova(conflictcon1, type = 3, test.statistic = 'F')
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.