####### Example 1: Self diagnozed ear infections in swimmers
data(swimmers)
fit <- zeroinf(infections ~ frequency + location, family="nb1(log)", data=swimmers)
### Cook's distance for all parameters in the "counts" model
cooks.distance(fit, submodel="counts", plot.it=TRUE, col="red", lty=1, lwd=1,
col.lab="blue", col.axis="blue", col.main="black", family="mono", cex=0.8)
### Cook's distance for all parameters in the "zeros" model
cooks.distance(fit, submodel="zeros", plot.it=TRUE, col="red", lty=1, lwd=1,
col.lab="blue", col.axis="blue", col.main="black", family="mono", cex=0.8)
Run the code above in your browser using DataLab