[R-sig-ME] Anova()'s Wald chisquare test for predictors with df > 1 in a logistic GLMM
j|ox @end|ng |rom mcm@@ter@c@
Thu Apr 18 17:26:57 CEST 2019
> -----Original Message-----
> From: R-sig-mixed-models [mailto:r-sig-mixed-models-bounces using r-
> project.org] On Behalf Of Juho Kristian Ruohonen
> Sent: Thursday, April 18, 2019 10:36 AM
> To: r-sig-mixed-models using r-project.org
> Subject: [R-sig-ME] Anova()'s Wald chisquare test for predictors with df > 1 in
> a logistic GLMM
> I'm trying to figure out how the Wald chi-square test is performed for a
> nominal predictor with more than two levels in the context of a logistic
> GLMM. With fixed-effects logistic models, Anova() defaults to a likelihood-
> ratio test, but since this requires refitting the model, it would be too slow for a
> GLMM, thus Anova() performs Wald chi-square tests instead. But how are
> they calculated for a multi-level nominal predictor?
For a "type-III" test, Anova() simply calculates the Wald statistic for the hypothesis that all population coefficients in a term, such as the coefficients of contrasts for a factor, are simultaneously 0, not individually 0 as you suggest below, which wouldn't account for the correlation of the coefficients. This test requires just the coefficient estimates and their covariance matrix but, unless you're careful, will test strange hypotheses.
"Type-II" Wald tests are more complicated (though they too are based only on the estimated coefficients and their covariance matrix), but a simple way to describe them is that they are computed to be maximally powerful while obeying the principle of marginality, so that, e.g., a test of a main effect marginal to an interaction ignores that interaction (i.e., assumes that it is 0). This is accomplished by a projection involving nested hypothesis matrices, and to see how it works, you can look at the code for the Anova() function in the sources of the car package.
Hamilton, Ontario, Canada
> My (un)educated guess is that for each level of the nominal variable, the z-
> score is squared and the sum of these squares compared to the right-tail
> probability of the chi-squared distribution with DF equal to the number of
> levels of the predictor minus one. And indeed this square-the-z approach
> seems to correctly reproduce the results of Anova() for predictors with a
> single degree of freedom. But I can't make it reproduce the results of
> Anova() for predictors with more than one level. Hence my question: how is
> the test statistic calculated?
> (My logistic GLMM was fit using glmer())
> [[alternative HTML version deleted]]
> R-sig-mixed-models using r-project.org mailing list
More information about the R-sig-mixed-models