1
$\begingroup$

I am having a problem that I am not finding an answer anywhere online.

I used glmmTMB to fit a mixed-model. My data is zero-inflated and I am including 3 variables in the zero-inflated formula.

I was using the Anova in the car package to extract p-values for each of my variables (I know that there are some limitations to it!). However, this only allows me to extract the p-values for the conditional model, and not for the zero-inflated or hurdle model. The summary of the model gives me some p-values but I have categorical variables and, therefore, I get a value for each level of the factors.

Is there any way I can get p-values for the zero-inflated part of the model? And if not, what would be the best way to report a zero-inflated or a hurdle model?

Any help would be greatly appreciated.

$\endgroup$

1 Answer 1

2
$\begingroup$

If you check the vignette, you can specify the component using component = :

library(glmmTMB)
library(car)

m1 <- glmmTMB(count ~ spp + mined + (1|site),zi=~mined,family=poisson, data=Salamanders)

car::Anova(m1,component="cond")
Analysis of Deviance Table (Type II Wald chisquare tests)

Response: count
        Chisq Df Pr(>Chisq)    
spp   125.625  6  < 2.2e-16 ***
mined  22.238  1  2.408e-06 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

car::Anova(m1,component="zi")
Analysis of Deviance Table (Type II Wald chisquare tests)

Response: count
       Chisq Df Pr(>Chisq)    
mined 34.509  1  4.243e-09 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

It is written:

car::Anova constructs type-II and type-III Anova tables for the fixed effect parameters of the conditional model (this might work with the fixed effects of the zero-inflation or dispersion models, but has not been tested)

Don't know if it is tested now..

$\endgroup$
3
  • $\begingroup$ Thank you @StupidWolf. Not sure what to do with the "not tested yet" part, though... $\endgroup$
    – Duque
    Jun 29, 2020 at 9:43
  • $\begingroup$ You can simulate your model under the null and see whether anova test makes sense $\endgroup$
    – StupidWolf
    Jun 29, 2020 at 10:31
  • $\begingroup$ unfortunately I do not quite understand what you mean or how to do it. Would it be possible to be more specific? For instance, using your example above... $\endgroup$
    – Duque
    Jun 29, 2020 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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