pdf("F:\\Rmisc\\graphs\\cotton_spindle.pdf") spindle <- read.table("http://www.stat.ufl.edu/~winner/data/cotton_spindle.dat",header=F, col.names=c("type","yarncount","output")) attach(spindle) plot(output[type==1] ~ yarncount[type==1]) spindle.reg <- lm(output[type==1] ~ yarncount[type==1]) summary(spindle.reg) anova(spindle.reg) spindle.aov <- lm(output[type==1] ~ factor(yarncount[type==1])) summary(spindle.aov) anova(spindle.aov) anova(spindle.reg,spindle.aov) library(MASS) boxcox(spindle.reg,plotit=T) boxcox(spindle.reg,lambda=seq(-1,0,0.01),plotit=T) dev.off()