0
$\begingroup$

I have high-frequency (daily) data with overdispersion and a high amount of zeros. I know that a zero-inflated negative binomial is my best option for a model. I am using the library ZIM in R. By using it I'm also correcting for autocorrelation given the high frequency of my data. This is my data where admissions has 281 0s out of 1304.

str(data)
'data.frame':   1304 obs. of  14 variables:
 $ date         : POSIXct, format: "2016-06-05" "2016-06-06" "2016-06-07" ...
 $ PM2.5        : num  9.91 9.81 8.54 9.91 11.36 ...
 $ Admissions   : int  1 4 5 10 13 8 3 5 13 9 ...
 $ no2      : num  3.05 2.86 2.62 3.68 5.95 ...

I'm trying to explain the number of ER admissions Admissions given the day's level of no2 or PM2.5. For both options, I get gigantic standard errors in my solution.

To run ZIM I calculate lags for both my dependent Admissions and independent variable no2.

countT<-data$Admissions>0
trend <- 1:length(countT) / 1000
lag<-dplyr::lag(data$no2, n = 30)
ar<-bshift(countT, k=11)

This is my output

Call:
zim(formula = countT ~ ar + data$no2 + lag + trend | data$no2 + lag + trend, dist = "zinb")

Coefficients (log-linear): 
              Estimate Std. Error z value Pr(>|z|)    
(Intercept) -1.2627172  0.1356004 -9.3120   <2e-16 ***
ar           1.1094678  0.1139324  9.7379   <2e-16 ***
data$no2     0.0019484  0.0064083  0.3040   0.7611    
lag          0.0039566  0.0063934  0.6189   0.5360    
trend        0.0265951  0.0835536  0.3183   0.7503   
Coefficients (logistic): 
          Estimate Std. Error z value Pr(>|z|)
(Intercept)  -19.29889 1744.68667 -0.0111   0.9912
data$no2       0.15399  106.47153  0.0014   0.9988
lag           -0.30275  252.52797 -0.0012   0.9990
trend          0.15710 1349.33740  0.0001   0.9999
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

(Dispersion parameter for negative binomial taken to be 78934295.4758) 

Criteria for assessing goodness of fit 
loglik: -1154.959 
aic: 2329.917 
bic: 2381.266 
tic: 2312.124 

Number of EM-NR iterations: 19 
Maximum absolute gradient: 5.005338e-05 

I am aware that I'm dealing with the Hauck-Donner effect. From what I have seen in other posts, usually, this problem appears while using categorical variables in ZINB models. I'm unsure how to solve it. In this post, I was dealing with fitting my data to a ZIP. The NA's give me an idea that my dependent variable, Admissions has a problem. How can I possibly solve the HDE?

$\endgroup$

0

Your Answer

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