HW7 - trt=rep(1:4,each=3 g = lm(y~ factor(b factor(trt...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 data=read.table("data7.1.txt",header=T) a=rep(1:5,times=5) b=rep(1:5,each=5) c=c(1,3,5,2,4,2,4,1,3,5,3,5,2,4,1,4,1,3,5,2,5,2,4,1,3) d=c(1,2,3,4,5,2,3,4,5,1,3,4,5,1,2,4,5,1,2,3,5,1,2,3,4) g = lm(Throughput ~ factor(a)+factor(b)+factor(c)+factor(d),data=data) summary(aov(g)) Df Sum Sq Mean Sq F value Pr(>F) factor(a) 4 125.2 31.3 1.5343 0.2806 factor(b) 4 167.2 41.8 2.0490 0.1800 factor(c) 4 3424.8 856.2 41.9706 2.062e-05 *** factor(d) 4 2857.6 714.4 35.0196 4.075e-05 *** Residuals 8 163.2 20.4 --- Signif. codes: 0 ¡¥***¡¦ 0.001 ¡¥**¡¦ 0.01 ¡¥*¡¦ 0.05 ¡¥.¡¦ 0.1 ¡¥ ¡¦ 1 fm1=aov(g) fm1Tukey=TukeyHSD(fm1,"factor(d)",conf.level=0.95) plot(fm1Tukey) # #Question 2 # y=c(1.11,1.70,1.60,1.22,1.11,1.22,0.95,1.52,1.54,0.82,0.97,1.18) b=c(1,2,3,2,3,4,1,3,4,1,2,4)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: trt=rep(1:4,each=3) g = lm(y~ factor(b)+factor(trt)) summary(aov(g)) plot(g$fit,g$res,xlab=expression(hat(y)),ylab="Residual", pch=4,col="blue",main="Residual Plot") abline(h=0) # # # plot(b,g$res,xaxt="n",xlab="Plate",ylab="Residuals",main="Plot of residual vs factor levels",pch=16) mtext(paste("1"),side=1,at=1) mtext(paste("2"),side=1,at=2) mtext(paste("3"),side=1,at=3) mtext(paste("4"),side=1,at=4) plot(trt,g$res,xaxt="n",xlab="Shape",ylab="Residuals",main="Plot of residual vs factor levels",pch=16) > mtext(paste("A"),side=1,at=1) > mtext(paste("B"),side=1,at=2) Sheet1 Page 2 > mtext(paste("C"),side=1,at=3) > mtext(paste("D"),side=1,at=4) # # # qqnorm(g$res,pch=20, main="Normal probability plot of residuals") qqline(g$res)...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

HW7 - trt=rep(1:4,each=3 g = lm(y~ factor(b factor(trt...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online