Learn R Programming

SMPracticals (version 1.4-3.1)

eyes: Visual Impairment Data

Description

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

Usage

data(eyes)

Arguments

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

References

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

Examples

Run this code
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

Run the code above in your browser using DataLab