Rforch21 - > summary(model) Df Sum Sq Mean Sq F...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
R Material for Chapter 21 > data.labs <- read.table(file=" http://www.stat.ufl.edu/~rrandles/sta4211/Rclassnotes/data/labs.txt ",col.na mes=c("lab","material","stress")) > attach(data.labs) > data.labs lab material stress 1 1 A 72 2 2 A 61 3 3 A 70 4 4 A 36 5 5 A 58 6 6 A 52 7 7 A 41 8 1 B 63 9 2 B 51 10 3 B 58 11 4 B 38 12 5 B 53 13 6 B 50 14 7 B 39 15 1 C 37 16 2 C 20 17 3 C 33 18 4 C 27 19 5 C 34 20 6 C 30 21 7 C 27 22 1 D 43 23 2 D 32 24 3 D 44 25 4 D 31 26 5 D 43 27 6 D 38 28 7 D 30 > flab <- factor(lab) > fmat <- factor(material) > model <- aov(stress~flab + fmat, data=data.labs) ## Main Effects Model (includes a
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: &gt; summary(model) Df Sum Sq Mean Sq F value Pr(&gt;F) flab 6 1520.00 253.33 8.576 0.0001707 *** fmat 3 2965.54 988.51 33.464 1.421e-07 *** Residuals 18 531.71 29.54 - - - - - - - - - -&gt; tapply(stress,flab,mean) 1 2 3 4 5 6 7 53.75 41.00 51.25 33.00 47.00 42.50 34.25 ## Lab means &gt; tapply(stress,fmat,mean) A B C D 55.71429 50.28571 29.71429 37.28571 ## Material means- - - - - - - - - -&gt; model2 &lt;- aov(stress~flab , data=data.labs) ## Analysis ignoring possible block effect &gt; summary(model2) Df Sum Sq Mean Sq F value Pr(&gt;F) flab 6 1520.0 253.33 1.5212 0.2198 Residuals 21 3497.2 166.54...
View Full Document

This note was uploaded on 07/08/2011 for the course STA 4211 taught by Professor Randles during the Spring '08 term at University of Florida.

Ask a homework question - tutors are online