German health registry for the year 1984.
A data frame with 3,874 observations on the following 17 variables.
number of visits to doctor during year (0-121)
number of days in hospital during year (0-51)
educational level (categorical: 1-4)
out of work=1; 0=working
married=1; 0=not married
have children=1; no children=0
household yearly income in marks (in Marks)
years of formal education (7-18)
self-employed=1; not self employed=0
(1/0) not high school graduate
(1/0) high school graduate
(1/0) graduate school
rwm1984 is saved as a data frame.
Count models typically use docvis as response variable. 0 counts are included
German Health Reform Registry, year=1984, in Hilbe and Greene (2007)
Hilbe, Joseph, M (2014), Modeling Count Data, Cambridge University Press
Hilbe, Joseph M (2011), Negative Binomial Regression, Cambridge University Press
Hilbe, J. and W. Greene (2008). Count Response Regression Models, in ed.
C.R. Rao, J.P Miller, and D.C. Rao, Epidemiology and Medical Statistics,
Elsevier Handbook of Statistics Series. London, UK: Elsevier.
data(rwm1984)glmrp <- glm(docvis ~ outwork + female + age + factor(edlevel), family=poisson, data=rwm1984)
exp(coef(glmrp))summary(nb2 <- nbinomial(docvis ~ outwork + female + age + factor(edlevel), data=rwm1984))
exp(coef(nb2))summary(glmrnb <- glm.nb(docvis ~ outwork + female + age + factor(edlevel), data=rwm1984))
Dataset imported from https://www.r-project.org.