search for: fm_zip

Displaying 1 result from an estimated 1 matches for "fm_zip".

Did you mean: __zip
2008 Dec 16
1
Prediction intervals for zero inflated Poisson regression
...RUE) ci <- data.frame(exp(prediction$fit + matrix(prediction$se.fit, ncol = 1) %*% c(-1.96, 1.96))) newdata$fit <- exp(prediction$fit) newdata <- cbind(newdata, ci) newdata$model <- "Poisson" library(pscl) #aproximate prediction intervals with zero inflated poisson regression fm_zip <- zeroinfl(art ~ fem | 1, data = bioChemists) fit <- predict(fm_zip) Pearson <- resid(fm_zip, type = "pearson") VarComp <- resid(fm_zip, type = "response") / Pearson fem <- bioChemists$fem bootstrap <- replicate(999, { yStar <- pmax(round(fit + sample(P...