HW21 Log > kyph = read.table("kyphosis.dat",header=T) > dim(kyph) [1] 81 5 > names(kyph) [1] "Id" "Kyphosis" "Age" "Number" "Start" > glmstep = step(glm(Kyphosis ~ Age, data=kyph, family=binomial), + Kyphosis ~ (Age + Number)*Start, direction="both") Start: AIC= 85.93 Kyphosis ~ Age Df Deviance AIC + Start 1 65.299 71.299 + Number 1 71.627 77.627 - Age 1 83.234 85.234 81.932 85.932 Step: AIC= 71.3 Kyphosis ~ Age + Start Df Deviance AIC + Number 1 61.380 69.380 65.299 71.299 - Age 1 68.072 72.072 + Age:Start 1 64.336 72.336 - Start 1 81.932 85.932 Step: AIC= 69.38 Kyphosis ~ Age + Start + Number Df Deviance AIC 61.380 69.380 + Age:Start 1 60.443 70.443 - Age 1 64.536 70.536 + Number:Start 1 60.992 70.992 - Number 1 65.299 71.299 - Start 1 71.627 77.627 > table(trunc(5*glmup$fit),kyph$Kyphosis) absent present 0 51 2 1 7 5 2 3 5 3 2 3 4 1 2