# NOT RUN {
data("hspider", package = "VGAM") # Count responses
hs.p <- vglm(Pardlugu ~ CoveHerb, poissonff, data = hspider)
hs.nb <- vglm(Pardlugu ~ CoveHerb, negbinomial, data = hspider)
hs.zip <- vglm(Pardlugu ~ CoveHerb, zipoisson, data = hspider)
hs.zap <- vglm(Pardlugu ~ CoveHerb, zapoisson, data = hspider)
opar <- par(mfrow = c(2, 2)) # Plot the rootograms
rootogram4(hs.p, max = 15, main = "poissonff")
rootogram4(hs.nb, max = 15, main = "negbinomial")
rootogram4(hs.zip, max = 15, main = "zipoisson")
rootogram4(hs.zap, max = 15, main = "zapoisson")
par(opar)
# }
Run the code above in your browser using DataLab