eyes: Visual Impairment Data

Description Usage Format Source References Examples

Description

Joint distribution of visual impairment on both eyes, by race and age.

Usage

1

Format

A data frame with 32 observations on the following 6 variables.

L

Impairment (+) or not (-) for left eye.

R

Impairment (+) or not (-) for right eye.

age

a factor with levels 40-50 51-60 61-70 70+

colour

White (W) or black (B)

a

mid-point for age groups, as numeric vector

y

Number of individuals in each class

Source

K.-Y. Liang, S. L. Zeger and B. Qaqish (1992) Multivariate regression analyses for categorical data (with Discussion). Journal of the Royal Statistical Society, series B, 54, 3–40.

References

Davison, A. C. (2003) Statistical Models. Cambridge University Press. Page 505.

Examples

1
2
3
data(eyes)
eyes.glm <- glm(y~age*colour+L*R+(L+R):poly(a,2)+colour:(L+R),poisson,data=eyes)
anova(eyes.glm,test="Chi")   # analysis of deviance for loglinear model

Example output

Loading required package: ellipse

Attaching package: 'ellipse'

The following object is masked from 'package:graphics':

    pairs

Analysis of Deviance Table

Model: poisson, link: log

Response: y

Terms added sequentially (first to last)


             Df Deviance Resid. Df Resid. Dev  Pr(>Chi)    
NULL                            31     9572.4              
age           3     23.2        28     9549.2 3.652e-05 ***
colour        1     50.7        27     9498.5 1.075e-12 ***
L             1   4279.1        26     5219.4 < 2.2e-16 ***
R             1   4154.6        25     1064.8 < 2.2e-16 ***
age:colour    3    156.3        22      908.5 < 2.2e-16 ***
L:R           1    582.0        21      326.5 < 2.2e-16 ***
L:poly(a, 2)  2    200.9        19      125.6 < 2.2e-16 ***
R:poly(a, 2)  2     92.4        17       33.2 < 2.2e-16 ***
colour:L      1     12.7        16       20.5 0.0003611 ***
colour:R      1      3.7        15       16.8 0.0547489 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

SMPracticals documentation built on May 2, 2019, 11:12 a.m.