A study of 1127 patients in which only three variables have been
selected. The data may be evaluated as a logistic or other binary response model
with the binary variable "badh" as the response. It may also be modeled as a count
model with "numvisit" (number of visits to a physician during the year) as the
response. "age" is an adjustor, and should be centered or standardized when
used in the model.
Usage
data(badhealth)
Format
A data frame with 1127 observations with 3 variables.
numvisit
Number of visits to a physician during the year: 0 - 40
badh
0=patient evaluates self as in good health; 1=patient in bad health
age
patient age: 20 - 60
Details
badhealth is saved as a data frame.
Source
Hilbe, Practical Guide to Logistic Regression, Chapman & Hall/CRC
References
Hilbe, Joseph M (2015), Practical Guide to Logistic Regression, Chapman & Hall/CRC
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/badhealth.rd_%03d_medium.png", width=480, height=480)
> ### Name: badhealth
> ### Title: badhealth
> ### Aliases: badhealth
> ### Keywords: datasets
>
> ### ** Examples
>
> library(LOGIT)
> data(badhealth)
> age.std <- scale(badhealth$age)
> summary(myhealth<- glm(badh ~ numvisit + age.std, family=binomial, data=badhealth))
Call:
glm(formula = badh ~ numvisit + age.std, family = binomial, data = badhealth)
Deviance Residuals:
Min 1Q Median 3Q Max
-3.0553 -0.4302 -0.3258 -0.2503 2.7930
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.07565 0.15679 -19.616 < 2e-16 ***
numvisit 0.22122 0.02628 8.419 < 2e-16 ***
age.std 0.57191 0.10906 5.244 1.57e-07 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 729.66 on 1126 degrees of freedom
Residual deviance: 603.43 on 1124 degrees of freedom
AIC: 609.43
Number of Fisher Scoring iterations: 5
> toOR(myhealth)
or delta zscore pvalue exp.loci. exp.upci.
(Intercept) 0.0462 0.0072 -19.6162 0 0.0339 0.0628
numvisit 1.2476 0.0328 8.4187 0 1.1850 1.3135
age.std 1.7717 0.1932 5.2441 0 1.4307 2.1939
>
>
>
>
>
>
> dev.off()
null device
1
>