I am trying to create some models using Poisson's zero multiplication regression using the pscl package, and after I processed the output object, which becomes zeroinfl , I believe that executing residuals(fm_zip) not equal to fm_zip$residuals .
The following is an example of what I'm saying:
library("pscl") data("bioChemists", package = "pscl") fm_zip <- zeroinfl(art ~ . | 1, data = bioChemists) names(fm_zip) fm_zip$residuals residuals(fm_zip) all.equal(fm_zip$residuals,residuals(fm_zip)) qplot(fm_zip$residuals,residuals(fm_zip))
As you know, the results are not equal. I would say that both paths are equivalent, but it seems that this is not so. Could you explain to me what's wrong with that? According to the remnants of R help, these two alternatives should return the difference (observed - fitted) . In contrast, I did the same with a simple linear regression of vanilla, and they are equal.
My version of R:
sessionInfo() R version 3.0.1 (2013-05-16) Platform: x86_64-w64-mingw32/x64 (64-bit)...
and the package version pscl_1.04.4
Any help is appreciated.
source share