getwd() c = read.csv("chickwts.csv", header=T) c attach(c) names(c) boxplot(weight~feed) boxplot(weight~feed, ylab="Weight", xlab="Feed type") boxplot(weight~feed, ylab="Weight", xlab="Feed type", main="Chick weights by feed type") anova(lm(weight~feed)) 1/0.0000000005936 a = aov(weight~feed) a summary(a) TukeyHSD(a, "feed") R2 = 231129/(231129+195556) r2 r2 R2 levels(feed) 4.5+7.5 12/ 2 7.5-6 1.5^2 20*2.25*2 90/2.5 40/2.5 180/2.5 80/2.5 1 - pf(72, 1, 76) 1 - pf(32, 1, 76) 1 - pf(8, 1, 76) 18/48 80/480 20/480 p = read.table("prob23.csv", sep=";", header=T) p attach(p) gene = factor(gene) fert = factor(fert) anova(lm(growth~gene + fert + gene*fert)) e = read.csv("esoph.csv", header=T) attach(e) anova(lm(prev ~ agegp + alcgp + agegp*alcgp))