chd.df: Coronary heart disease data

Description Usage Format Source References Examples

Description

Shows the age of the subject and presence or absence of evidence of significant coronary heart disease.

Usage

1

Format

A data frame with 100 observations on the following 2 variables:

age

age of subject in years

chd

0 indicates CHD absent, 1 indicates it is present

Source

Hosmer, and Lemeshow Applied Logistic Regression, pp 2-5

References

Hosmer, D. W., and Lemeshow, S. (2000). Applied Logistic Regression, Second edition, Wiley, New York.

Examples

1
2
3
data(chd.df)
chd.glm<-glm(chd~age,family=binomial,data=chd.df)
summary(chd.glm)

Example output

Loading required package: s20x
Loading required package: leaps
Loading required package: rgl
Loading required package: lattice
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

Call:
glm(formula = chd ~ age, family = binomial, data = chd.df)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.9686  -0.8480  -0.4607   0.8262   2.2794  

Coefficients:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept) -5.27844    1.13054  -4.669 3.03e-06 ***
age          0.11032    0.02402   4.593 4.37e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 136.66  on 99  degrees of freedom
Residual deviance: 107.68  on 98  degrees of freedom
AIC: 111.68

Number of Fisher Scoring iterations: 4

R330 documentation built on May 2, 2019, 2:12 p.m.