I've recently learned about using ZI-Negative Binomial in R, but I haven't been able to figure out why my model results are not calculating a standard error.
Call: zeroinfl(formula = comp_counts ~ bc, data = master_region, dist = "negbin", link = "logit") Pearson residuals: Min 1Q Median 3Q Max -0.2402 -0.2385 -0.2385 -0.2385 461.0861 Count model coefficients (negbin with log link): Estimate Std. Error z value Pr(>|z|) (Intercept) 3.534e-01 NA NA NA bc 2.301e-09 NA NA NA Log(theta) -2.826e+00 NA NA NA Zero-inflation model coefficients (binomial with logit link): Estimate Std. Error z value Pr(>|z|) (Intercept) -12.95553 NA NA NA bc -0.00567 NA NA NA Theta = 0.0593 Number of iterations in BFGS optimization: 48 Log-likelihood: -3.431e+05 on 5 Df
The dependent variable
comp_counts is indeed inflated with 0's (83% of observations for the dependent variable are actually 0's).
To provide additional details on the variables,
comp_counts is a count, ranging from 0 to 2754, and
bc is a continuous variable. However, the independent variable
bc also has several 0's (99.4% of observations are 0). Could this be causing the problem in the model?
Thanks for your help! Apologies for the novice question. Happy to provide the data if it is helpful.
Edit: the same issue (no standard errors) also occurs when I use the zero inflated poisson model. No warnings are produced, so not sure what's happening
Edit 2: Performing the regression models by reversing the dependent and independent variable does produce results with standard errors (ie, the dependent is now
bc and independent
comp_counts). But this is not the direction of causality that I seek to explore
Call: zeroinfl(formula = bc ~ comp_counts, data = master_region, dist = "poisson", link = "logit") Pearson residuals: Min 1Q Median 3Q Max -0.09871 -0.07143 -0.07143 -0.07143 4732.55835 Count model coefficients (poisson with log link): Estimate Std. Error z value Pr(>|z|) (Intercept) 1.321e+01 3.179e-05 415741 <2e-16 *** comp_counts 7.672e-03 3.626e-06 2116 <2e-16 *** Zero-inflation model coefficients (binomial with logit link): Estimate Std. Error z value Pr(>|z|) (Intercept) 5.2781149 0.0232286 227.224 <2e-16 *** comp_counts -0.0002349 0.0010703 -0.219 0.826 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
EDIT 3: The data is attached here