a5ans - Department of Statistics STATS351: Design and...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Department of Statistics STATS351: Design and Analysis of Experiments Model Answers, Assignment 5, Semester 2 2008 1. [ 15 marks ] (a) [ 5 marks ] i. In R: > site<-factor(rep(c("I","II","III","IV"),4)) > day<-factor(rep(1:4,c(4,4,4,4))) > inhibitor<-factor(LETTERS[c(1:4,4,1:3,3,4,1,2,2:4,1)]) > counts<-c(193,522,235,103,40,88,386,83,19,26,82,254,130,35,58,124) > insect.df<-data.frame(site,day,inhibitor,counts) > insect.aov<-aov(log(counts)~inhibitor+Error(site*day)) > summary(insect.aov) Error: site Df Sum Sq Mean Sq F value Pr(>F) Residuals 3 1.65592 0.55197 Error: day Df Sum Sq Mean Sq F value Pr(>F) Residuals 3 4.1585 1.3862 Error: site:day Df Sum Sq Mean Sq F value Pr(>F) inhibitor 3 7.4524 2.4841 44.269 0.0001738 *** Residuals 6 0.3367 0.0561 ii. There is very strong evidence that expected numbers of moths caught is not the same for all of the different treatments. iii. The ANOVA table indicates that blocking on both site and day was sensible as the Residual Mean Square for both the site stratum and the day stratum are much larger than that for the site:day stratum. (b) [ 5 marks ] The output for model.tables is: > model.tables(insect.aov,type="means") Tables of means Grand mean 4.60036 inhibitor inhibitor A B C D 4.742 5.655 4.095 3.911 > lsd<-qt(.975,6)* sqrt(2*.0561/4) > lsd [1] 0.4098121 > tsr<-qtukey(.95,4,6)/sqrt(2)*sqrt(2*.0561/4) > tsr [1] 0.5797721 In this case we arrive at exactly the same conclusions whether we use the LSD or the...
View Full Document

Page1 / 4

a5ans - Department of Statistics STATS351: Design and...

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