STAT 431/831 ASSIGNMENT 2 DUE: OCTOBER 21, 20081. [9 points] A sample of 146 five-year-old children had their teeth examined and those with decayed,missing, or filled teeth (dmft) were noted. From their address it was also determined whether theirdrinking water was fluoridated. Finally, on the basis of various sociological measurements, their socialclass was designed as I,II,III, or unclassifiable
...[Show More]
STAT 431/831 ASSIGNMENT 2 DUE: OCTOBER 21, 2008
1. [9 points] A sample of 146 five-year-old children had their teeth examined and those with decayed,
missing, or filled teeth (dmft) were noted. From their address it was also determined whether their
drinking water was fluoridated. Finally, on the basis of various sociological measurements, their social
class was designed as I,II,III, or unclassifiable. The data are given in Table 2.
Table 2. Fluoridation and Dental Health
Class I Class II Class III Unclassified Total
Fluoridated 12/117 26/170 11/52 24/118 73/457
Unfluoridated 12/56 48/146 29/64 49/104 138/370
Note: Each entry gives the number of children with dmft from the total number of children in that
cell (Carmichael et at., 1989).
(a) [3 points] Test the hypothesis that the effect of fluoridation does not depend on social class.
To do this, let’s first input the data.
# Input the data
teeth.dat<-read.table("teeth.dat",header=T)
# Create indicator variables for class using a treatment contrast
teeth.dat$classf<-factor(teeth.dat$class)
teeth.dat$classft<-C(teeth.dat$classf,treatment)
# Construct the response variable for logistic regression
teeth.dat$resp<-cbind(teeth.dat$y,teeth.dat$m-teeth.dat$y)
# Display the matrix of data
[Show Less]