pdf("picloram.pdf") pic1 <- read.fwf("C:\\data\\picloram.dat", width=c(8,8,8), col.names = c("replicate", "dose", "death")) replic2 <- rep(c(0,1,0),c(95,105,113)) replic3 <- rep(c(0,1), c(200,113)) picloram <- data.frame(dose=pic1$dose, death=pic1$death, replic2=replic2, replic3=replic3) attach(picloram) picloram.mod1 <- glm(formula = death ~ dose, family=binomial("logit")) summary(picloram.mod1) anova(picloram.mod1, test="Chisq") picloram.mod2 <- glm(formula = death ~ dose + replic2 + replic3, family=binomial("logit")) summary(picloram.mod2) anova(picloram.mod2, test="Chisq") dev.off()