I have been trying to read all the documentation I have, but I'm still not sure what the difference is between the "conditional" and zero-inflated models in the output of the glmmTMB. Below is some code modelling a zero-inflated count dependent variable (alcoholic drinks, standardized). The observations are nested within persons (153 persons, 90 observations each).
I am wondering if the "Conditional model" is simply the original model that doesn't consider zero-inflation, whereas the "zero-inflated" is the model with this factored in (hence I would report these stats only?). In addition, I am wondering whether the zero-inflated model includes 0 values or not, given that the estimates change in direction (and sometimes in significance). Or maybe I have this all the other way around. Any clarifications would be helpful.
Also when playing around with the output, the allEffects
function only plots the conditional model. I am wondering if there's an easy way to plot the zero-inflated model as well.
Thanks in advance!
> model1 <- glmmTMB(drinks_round ~ sex + cann_used + cann_g + other_type + n_used + day + wDay
+ (1|studyID),
zi = ~sex + can_used + cann_g + other_type + n_used + day + wDay,
family=nbinom2, data=can1
)
> summary(model1)
Family: nbinom2 ( log )
Formula:
drinks_round ~ sex + cann_used + cann_g + other_type + n_used + day + wDay
+ (1 | studyID)
Zero inflation:
~sex + cann_used + cann_g + other_type + n_used + day + wDay
Data: can1
AIC BIC logLik deviance df.resid
24795.8 24931.4 -12379.9 24759.8 13752
Random effects:
Conditional model:
Groups Name Variance Std.Dev.
studyID (Intercept) 0.4657 0.6825
Number of obs: 13770, groups: studyID, 153
Overdispersion parameter for nbinom2 family (): 4.97
Conditional model:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.1459925 0.2080129 5.509 3.60e-08 ***
sex -0.1729803 0.1209996 -1.430 0.1528
cann_used 0.0640049 0.0416621 1.536 0.1245
cann_g 0.1866736 0.0311277 5.997 2.01e-09 ***
other_type -0.0330603 0.0691555 -0.478 0.6326
n_used 0.3266708 0.0660834 4.943 7.68e-07 ***
day 0.0010574 0.0005845 1.809 0.0705 .
wDayweekday -0.2464173 0.0314343 -7.839 4.54e-15 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Zero-inflation model:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.8868254 0.1014340 8.743 < 2e-16 ***
sex 0.0638217 0.0495552 1.288 0.1978
cann_used -0.2525820 0.0593977 -4.252 2.12e-05 ***
cann_g 0.2174713 0.0410397 5.299 1.16e-07 ***
other_type -0.1837736 0.0996293 -1.845 0.0651 .
n_used -0.3920739 0.0720337 -5.443 5.24e-08 ***
day 0.0002897 0.0008903 0.325 0.7449
wDayweekday 0.3367418 0.0487646 6.905 5.00e-12 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1