{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Rforch28 - R Material for Chapter 28 > data.detergent...

This preview shows pages 1–3. Sign up to view the full content.

R Material for Chapter 28 > data.detergent <- read.table(file=" http://www.stat.ufl.edu/~rrandles/sta4211/Rclassnotes/data/detergent.txt ",c ol.names=c("response","formula","block","sink")) > attach(data.detergent) > data.detergent response formula block sink 1 13 3 1 1 2 20 8 1 2 3 7 4 1 3 4 6 4 2 1 5 29 9 2 2 6 17 2 2 3 7 15 3 3 1 8 23 6 3 2 9 31 9 3 3 10 31 9 4 1 11 26 5 4 2 12 20 1 4 3 13 16 2 5 1 14 21 7 5 2 15 23 6 5 3 16 23 6 6 1 17 26 5 6 2 18 6 4 6 3 19 28 9 7 1 20 19 8 7 2 21 21 7 7 3 22 20 7 8 1 23 20 1 8 2 24 7 4 8 3 25 24 6 9 1 26 19 8 9 2 27 20 1 9 3 28 26 5 10 1 29 19 8 10 2 30 17 2 10 3 31 24 5 11 1 32 14 3 11 2 33 19 7 11 3 34 11 3 12 1 35 17 2 12 2 36 19 1 12 3 > fform <- factor(formula) > fblock <- factor(block) > fsink <- factor(sink) > model1 <- aov(response~ fform +fblock) > summary(model1) Df Sum Sq Mean Sq F value Pr(>F) fform 8 1485.06 185.632 204.5740 1.241e-14 *** fblock 11 10.73 0.976 1.0751 0.4352 Residuals 16 14.52 0.907 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

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

View Full Document
> model2 <- aov(response~fblock) > summary(model2) Df Sum Sq Mean Sq F value Pr(>F) fblock 11 412.97 37.543 0.8211 0.6209 Residuals 24 1097.33 45.722 > coef(model1) (Intercept) fform2 fform3 fform4 fform5 fform6 20.03703704 -2.55555556 -6.33333333 -13.22222222 5.77777778 3.22222222 fform7 fform8 fform9 fblock2 fblock3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}