German health reform data for the year 1984. Subset of a multiyear
registry evaluating differences in physician provider utilization
prior to and after health reform legislation in the late 1980s.
Usage
data(rwm1984)
Format
A data frame with 3,874 observations on the following 15 variables.
outwork
out of work=1; 0=working
docvis
number of visits to doctor during year (0-121)
hospvis
number of days in hospital during year (0-51)
edlevel
educational level (categorical: 1-4)
age
age: 25-64
female
female=1; 0=male
married
married=1; 0=not married
kids
have children=1; no children=0
hhninc
household yearly income in marks (in Marks)
educ
years of formal education (7-18)
self
self-employed=1; not self employed=0
edlevel1
(1/0) not high school graduate
edlevel2
(1/0) high school graduate
edlevel3
(1/0) university/college
edlevel4
(1/0) graduate school
Details
rwm1984 is saved as a data frame. The data is typically used to model
docvis, which is a count variable. It also may be used to model "outwork",
a variable indicating if a patient is out-of-work. "outwork" is a binary
variable which can be used as the response of a logistic or other binary
response model.
Source
German Health Reform Registry for the year 1984, in Hilbe and Greene (2007)
References
Hardin & Hilbe (2013), Generalized Linear Models & Extensions, 3rd ed, Stata Press.
Hilbe, Joseph M (2009), Logistic Regression Models, Chapman & Hall/CRC.
Hilbe, Joseph M (2011), Negative Binomial Regression, 2nd ed., Cambridge University Press.
Hilbe, Joseph M (2014), Modeling Count Data, Cambridge University Press.
Hilbe, Joseph M (2015), Practical Guide to Logistic Regression, Chapman & Hall/CRC.
Examples
# library(MASS) if not automatically loaded
library(LOGIT)
# library(COUNT) rwm1984 also in COUNT pacakge, but not toOR or P_disp
data(rwm1984)
# center both docvis and age
rwm1984$cage <- rwm1984$age - mean(rwm1984$age)
rwm1984$cdoc <- rwm1984$docvis - mean(rwm1984$docvis)
glmrp <- glm(outwork ~ cdoc + female + kids + cage + factor(edlevel),
family=binomial, data=rwm1984)
summary(glmrp)
exp(coef(glmrp))
toOR(glmrp)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(LOGIT)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LOGIT/rwm1984.rd_%03d_medium.png", width=480, height=480)
> ### Name: rwm1984
> ### Title: rwm1984
> ### Aliases: rwm1984
> ### Keywords: datasets
>
> ### ** Examples
>
> # library(MASS) if not automatically loaded
> library(LOGIT)
> # library(COUNT) rwm1984 also in COUNT pacakge, but not toOR or P_disp
> data(rwm1984)
> # center both docvis and age
> rwm1984$cage <- rwm1984$age - mean(rwm1984$age)
> rwm1984$cdoc <- rwm1984$docvis - mean(rwm1984$docvis)
> glmrp <- glm(outwork ~ cdoc + female + kids + cage + factor(edlevel),
+ family=binomial, data=rwm1984)
> summary(glmrp)
Call:
glm(formula = outwork ~ cdoc + female + kids + cage + factor(edlevel),
family = binomial, data = rwm1984)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.3615 -0.6807 -0.4320 0.8541 2.8220
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.022806 0.085790 -23.579 < 2e-16 ***
cdoc 0.024480 0.006255 3.914 9.08e-05 ***
female 2.268467 0.084039 26.993 < 2e-16 ***
kids 0.373053 0.090586 4.118 3.82e-05 ***
cage 0.054355 0.004207 12.921 < 2e-16 ***
factor(edlevel)2 0.009293 0.173172 0.054 0.957201
factor(edlevel)3 0.478016 0.153786 3.108 0.001882 **
factor(edlevel)4 -0.830282 0.214336 -3.874 0.000107 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 5091.1 on 3873 degrees of freedom
Residual deviance: 3889.9 on 3866 degrees of freedom
AIC: 3905.9
Number of Fisher Scoring iterations: 4
> exp(coef(glmrp))
(Intercept) cdoc female kids
0.1322837 1.0247821 9.6645776 1.4521618
cage factor(edlevel)2 factor(edlevel)3 factor(edlevel)4
1.0558599 1.0093368 1.6128714 0.4359263
> toOR(glmrp)
or delta zscore pvalue exp.loci. exp.upci.
(Intercept) 0.1323 0.0113 -23.5787 0.0000 0.1118 0.1565
cdoc 1.0248 0.0064 3.9138 0.0001 1.0123 1.0374
female 9.6646 0.8122 26.9929 0.0000 8.1969 11.3951
kids 1.4522 0.1315 4.1182 0.0000 1.2159 1.7343
cage 1.0559 0.0044 12.9205 0.0000 1.0472 1.0646
factor(edlevel)2 1.0093 0.1748 0.0537 0.9572 0.7188 1.4172
factor(edlevel)3 1.6129 0.2480 3.1083 0.0019 1.1932 2.1802
factor(edlevel)4 0.4359 0.0934 -3.8737 0.0001 0.2864 0.6635
>
>
>
>
>
>
>
> dev.off()
null device
1
>