[R-sig-ME] Odd ANOVA degrees of freedom with ZI component of glmmTMB model

Elliot Johnston e|||otjohn@ton21 @end|ng |rom gm@||@com
Wed Jan 11 18:14:29 CET 2023


Hi all,

I am using the car package to run ANOVAs (type II Wald chi square tests) on
the following model:

m1 <- glmmTMB(Count ~ Time_Period*Assignment + (1|Region/Site_ID),
                  ziformula = ~ Time_Period*Assignment + (1|Region/Site_ID),
                  data = allbirds, family = poisson)

Time Period has three levels and Assignment has two levels. When running
the ANOVA on the conditional component -- car::Anova(m1, component =
"cond") -- the degrees of freedom in the output is as I would expected
(n-1):

                                Chisq    Df  Pr(>Chisq)
Time_Period            0.9105  2    0.63429
Assignment             2.1043  1    0.14689
Time_Period:Assignment 6.8486  2    0.03257 *

But when I run the ANOVA for the zero-inflated component -- car::Anova(m1,
component = "zi") -- the output looks strange:

                                Chisq    Df Pr(>Chisq)
Time_Period            9.8876  3   0.019546 *
Assignment             9.4648  2   0.008805 **
Time_Period:Assignment 7.9605  2   0.018681 *

Why would the degrees of freedom change? FWIW this df discrepancy between
the conditional and ZI ANOVAs does *not* happen when running the above
glmmTMB model with subsetted data frames based on different bird guilds. It
also seems strange that between the Time Period and Assignment terms the
smaller chi square value leads to greater statistical significance. Do you
agree that something seems wrong here or am I misunderstanding what is
going on under the hood? Any ideas on how to troubleshoot?

Thank you!

-Elliot

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list