Lee, Laura
2012-Nov-30 16:12 UTC
[R] Standard errors for predictions of zero-inflated models
Dear all, I am using the zeroinfl() function from the pscl package to develop a zero-inflated Poisson GLM. I would like to calculate the standard errors of predicted values. I've tried code posted in a previous discussion on this topic (https://stat.ethz.ch/pipermail/r-help/2008-December/182806.html), and I don't understand the results. Before I apply this code, I get the predicted value for the data 'newdat' using the following: -> predict(bestfit,type="response",newdata=newdat) 109 198.5146 The predicted value is approximately 199. When I apply the previously mentioned code (predict.zeroinfl), I can now calculate the standard error: -> predict(bestfit,type="response",se=TRUE,newdata=newdat) MC iterate 1 of 1000 MC iterate 2 of 1000 ... MC iterate 1000 of 1000 [[1]] 109 0.00016793 [[2]] [[2]]$lower [1] 9.151924e-05 [[2]]$upper [1] 0.0002945504 [[2]]$se [1] 5.296472e-05 However, the predicted value is now 1.7x10^-4. The standard error value makes sense for this predicted value, but I'm not sure why the predicted value has changed. I would appreciate any assistance. Cheers, Laura [[alternative HTML version deleted]]