

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: STATISTICAL METHODS II; Subject: Statistics; University: University of South Carolina - Columbia; Term: Unknown 1989;
Typology: Study notes
1 / 2
This page cannot be seen from the preview
Don't miss anything!


> # This example shows the analysis for the Latin Square experiment > # using the productivity data example we looked at in class > > # Entering the data and defining the variables: > > ########## > ## > # Reading the data into R: > > my.datafile <- tempfile() > cat(file=my.datafile, "
Signif. codes: 0 '' 0.001 '' 0.01 '' 0.05 '.' 0.1 ' ' 1 > > # From the F-tests and their P-values, there is a significant effect of music type > # on mean productivity. We also see a significant row (TIME) effect and column (DAY) > # effect. > > ############################################################################ > > # The sample mean productivity values for each music type, listed from smallest to largest: > > sort( tapply(PRODUCT, MUSIC, mean) ) A B E D C 7.96 9.20 10.10 11.28 12. > > # Now, which of these means are significantly different? > > # Tukey's procedure tells us which pairs of music types are significantly > # different: > > # Tukey CIs for pairwise treatment mean differences:
> TukeyHSD(aov(musicprod.fit),conf.level=0.95)$MUSIC diff lwr upr p adj B-A 1.24 -0.91893738 3.39893738 0. C-A 4.26 2.10106262 6.41893738 0. D-A 3.32 1.16106262 5.47893738 0. E-A 2.14 -0.01893738 4.29893738 0. C-B 3.02 0.86106262 5.17893738 0. D-B 2.08 -0.07893738 4.23893738 0. E-B 0.90 -1.25893738 3.05893738 0. D-C -0.94 -3.09893738 1.21893738 0. E-C -2.12 -4.27893738 0.03893738 0. E-D -1.18 -3.33893738 0.97893738 0. > > # NOTE: The CIs which do NOT contain zero indicate the treatment means > # that are significantly different at (here) the 0.05 experimentwise significance level. >