Description Usage Format Details Source References Examples
From German health survey data for the year 1998 only.
1 |
A data frame with 1,127 observations on the following 3 variables.
numvisit
number of visits to doctor during 1998
badh
1=patient claims to be in bad health; 0=not in bad health
age
age of patient: 20-60
badhealth is saved as a data frame. Count models use numvisit as the response variable, 0 counts are included.
German Health Survey, amended in Hilbe and Greene (2008).
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.
1 2 3 4 5 6 7 8 |
Loading required package: msme
Loading required package: MASS
Loading required package: lattice
Loading required package: sandwich
Call:
glm(formula = numvisit ~ badh + age, family = poisson, data = badhealth)
Deviance Residuals:
Min 1Q Median 3Q Max
-3.6653 -1.9186 -0.6789 0.6292 10.0684
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.447022 0.071428 6.258 3.89e-10 ***
badh 1.108331 0.046169 24.006 < 2e-16 ***
age 0.005822 0.001822 3.195 0.0014 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 4020.3 on 1126 degrees of freedom
Residual deviance: 3465.3 on 1124 degrees of freedom
AIC: 5638.6
Number of Fisher Scoring iterations: 5
(Intercept) badh age
1.563648 3.029299 1.005839
Call:
glm.nb(formula = numvisit ~ badh + age, data = badhealth, init.theta = 0.9974812528,
link = log)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.0304 -1.4361 -0.4152 0.3180 3.9516
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.404116 0.130847 3.088 0.00201 **
badh 1.107342 0.111603 9.922 < 2e-16 ***
age 0.006952 0.003397 2.047 0.04070 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(0.9975) family taken to be 1)
Null deviance: 1355.7 on 1126 degrees of freedom
Residual deviance: 1217.7 on 1124 degrees of freedom
AIC: 4475.3
Number of Fisher Scoring iterations: 1
Theta: 0.9975
Std. Err.: 0.0693
2 x log-likelihood: -4467.2850
(Intercept) badh age
1.497977 3.026304 1.006977
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.