data(E1.20)
## Some data reorganization before analysis:
## Maybe reshape could have been used here?
e1.20 <- data.frame(rbind(as.matrix(E1.20[,c(2,4)]),
as.matrix(E1.20[,c(2,5)]),
as.matrix(E1.20[,c(2,6)]),
as.matrix(E1.20[,c(2,7)])),row.names=1:52)
attr(e1.20,"names")[[2]] <- "IMR"
e1.20$Female <- c(rep(0,13), rep(1,13),rep(0,13),rep(1,13))
e1.20$Urban <- c(rep(0,26),rep(1,26))
## Now the analysis can start.
summary(e1.20)
Run the code above in your browser using DataLab