Vishnu B
2011-May-23 10:00 UTC
[R] Interpreting the results of the zero inflated negative binomial regression
Hi, I am new to R and has been depending mostly on the online tutotials to learn R. I have to deal with zero inflated negative binomial distribution. I am however unable to understand the following example from this link http://www.ats.ucla.edu/stat/r/dae/zinbreg.htm The result gives two blocks. *library(pscl) zinb<-zeroinfl(count ~ child + camper | persons, dist = "negbin", EM = TRUE) summary(zinb) *Call: zeroinfl(formula = count ~ child + camper | persons, dist = "negbin", EM = TRUE) Count model coefficients (negbin with log link): Estimate Std. Error z value Pr(>|z|) (Intercept) 1.3711 0.2561 5.353 8.63e-08 *** child -1.5152 0.1956 -7.747 9.42e-15 *** camper 0.8790 0.2693 3.264 0.00110 ** Log(theta) -0.9854 0.1759 -5.601 2.14e-08 *** Zero-inflation model coefficients (binomial with logit link): Estimate Std. Error z value Pr(>|z|) (Intercept) 1.6028 0.8363 1.917 0.0553 . persons -1.6662 0.6789 -2.454 0.0141 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Theta = 0.3733 Number of iterations in BFGS optimization: 2 Log-likelihood: -432.9 on 6 Df What does this mean? What is the significance of "| persons" in the example? Is the complete summary the full model? When I tried to use it, I got an independent variable, which had a z- value of 0.005 in the second block. How should i infer? Thanks and Regards, Vishnu B Research Scholar, Transportation Engineering Division, IIT Madras, Chennai 600036 Mob: +919445069977 [[alternative HTML version deleted]]
Ben Bolker
2011-May-24 11:24 UTC
[R] Interpreting the results of the zero inflated negative binomial regression
Vishnu B <vishnub87 <at> gmail.com> writes:> I am new to R and has been depending mostly on the online tutotials to learn > R. I have to deal with zero inflated negative binomial distribution. I am > however unable to understand the following example from this link > http://www.ats.ucla.edu/stat/r/dae/zinbreg.htm > > The result gives two blocks. > > *library(pscl) > zinb<-zeroinfl(count ~ child + camper | persons, dist = "negbin", EM = TRUE) > summary(zinb) > *Call: > zeroinfl(formula = count ~ child + camper | persons, dist = "negbin", > EM = TRUE) > > Count model coefficients (negbin with log link): > Estimate Std. Error z value Pr(>|z|) > (Intercept) 1.3711 0.2561 5.353 8.63e-08 *** > child -1.5152 0.1956 -7.747 9.42e-15 *** > camper 0.8790 0.2693 3.264 0.00110 ** > Log(theta) -0.9854 0.1759 -5.601 2.14e-08 *** > > Zero-inflation model coefficients (binomial with logit link): > Estimate Std. Error z value Pr(>|z|) > (Intercept) 1.6028 0.8363 1.917 0.0553 . > persons -1.6662 0.6789 -2.454 0.0141 * > --- > Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > Theta = 0.3733 > Number of iterations in BFGS optimization: 2 > Log-likelihood: -432.9 on 6 Df > > What does this mean? What is the significance of "| persons" in the example? > Is the complete summary the full model? When I tried to use it, I got an > independent variable, which had a z- value of 0.005 in the second block. How > should i infer? >You should carefully read the help page for the function you are using: ?zeroinfl. The variables on the right hand side of the bar are the predictor variables for the zero-inflation part of the model (as the summary suggests). The p-value (sic) of 0.0553 for the intercept of the zero-inflation component means that you could reject the null hypothesis that the intercept is zero (or equivalent that the zero-inflation probability is 0.5 for the baseline level of "persons" (i.e. there were no people in the camping group -- a somewhat unrealistic baseline level!) If you have a predictor variable (not just the intercept) with a (sic) p-value of 0.005, it means that you can reject the null hypothesis that the predictor has zero effect on the zero-inflation component of the model. The r-help list is really intended for R questions, and this verges on a statistics question. Please read the posting guide ...