Learn R Programming

COUNT (version 1.3.4)

nb2.obs.pred: Table of negative binomial counts: observed vs predicted proportions and difference

Description

nb2.obs.pred is used to produce a table of a negative binomial model count response with mean observed vs mean predicted proportions, and their difference.

Usage

nb2.obs.pred(len, model)

Value

Count

count value

obsPropFreq

Observed proportion of counts

avgp

Predicted proportion of counts

Diff

Difference in observed vs predicted

Arguments

len

highest count for the table

model

name of the negative binomial model created

Author

Joseph M. Hilbe, Arizona State University, and Jet Propulsion Laboratory, California Institute of Technology Andrew Robinson, University of Melbourne, Australia

Details

nb2.obs.pred is used to determine where disparities exist in the mean observed and predicted proportions in the range of model counts. nb2.obs.pred is used in Table 9.28 and other places in Hilbe (2011). nb2.obs.pred follows glm.nb(), where both y=TRUE and model=TRUE options must be used.

References

Hilbe, J.M. (2011), Negative Binomial Regression, second edition, Cambridge University Press.

See Also

myTable

Examples

Run this code
library(MASS)

data(medpar)
mdpar <- glm.nb(los ~ hmo+white+type2+type3, data=medpar, y=TRUE, model=TRUE)
nb2.obs.pred(len=25, model=mdpar)

Run the code above in your browser using DataLab