The data set relates to the hospital length of stay for patients having
a CABG or PTCA (typel) heart procedure. The data comes from the 1995
Arizona Medicare data for DRG (Diagnostic Related Group) 112. Other predictors
include gender(1=female) and age75 (1-age 75+). Type is labeled as 1=emergency
or urgent admission; 0= elective. Length of stay (los) ranges from 1 to 53 days.
Usage
data(azdrg112)
Format
A data frame with 1,798 observations on the following 4 variables.
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(COUNT)
Loading required package: msme
Loading required package: MASS
Loading required package: lattice
Loading required package: sandwich
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/COUNT/azdrg112.Rd_%03d_medium.png", width=480, height=480)
> ### Name: azdrg112
> ### Title: azdrg112
> ### Aliases: azdrg112
> ### Keywords: datasets
>
> ### ** Examples
>
> data(azdrg112)
> glmazp <- glm(los ~ type1 + gender + age75, family=poisson, data=azdrg112)
> summary(glmazp)
Call:
glm(formula = los ~ type1 + gender + age75, family = poisson,
data = azdrg112)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.8352 -1.0785 -0.4225 0.6337 11.6269
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.18224 0.02759 42.844 < 2e-16 ***
type1 0.62804 0.02584 24.309 < 2e-16 ***
gender -0.14745 0.02184 -6.752 1.45e-11 ***
age75 0.12978 0.02317 5.602 2.12e-08 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 4145.2 on 1797 degrees of freedom
Residual deviance: 3364.0 on 1794 degrees of freedom
AIC: 9178.5
Number of Fisher Scoring iterations: 5
> exp(coef(glmazp))
(Intercept) type1 gender age75
3.2616583 1.8739345 0.8629032 1.1385801
> library(MASS)
> glmaznb <- glm.nb(los ~ type1 + gender + age75, data=azdrg112)
> summary(glmaznb)
Call:
glm.nb(formula = los ~ type1 + gender + age75, data = azdrg112,
init.theta = 5.449919402, link = log)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.1261 -0.8054 -0.2910 0.4843 6.2802
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.18600 0.03602 32.925 < 2e-16 ***
type1 0.62635 0.03344 18.730 < 2e-16 ***
gender -0.14690 0.03064 -4.795 1.63e-06 ***
age75 0.11990 0.03275 3.661 0.000251 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(5.4499) family taken to be 1)
Null deviance: 2098.5 on 1797 degrees of freedom
Residual deviance: 1675.0 on 1794 degrees of freedom
AIC: 8568.9
Number of Fisher Scoring iterations: 1
Theta: 5.450
Std. Err.: 0.366
2 x log-likelihood: -8558.917
> exp(coef(glmaznb))
(Intercept) type1 gender age75
3.273966 1.870767 0.863378 1.127388
>
>
>
>
>
> dev.off()
null device
1
>