powered by
Joint distribution of visual impairment on both eyes, by race and age.
data(eyes)
A data frame with 32 observations on the following 6 variables.
Impairment (+) or not (-) for left eye.
Impairment (+) or not (-) for right eye.
a factor with levels 40-50 51-60 61-70 70+
40-50
51-60
61-70
70+
White (W) or black (B)
mid-point for age groups, as numeric vector
Number of individuals in each class
Davison, A. C. (2003) Statistical Models. Cambridge University Press. Page 505.
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