This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: model1 = lm(grow ~ nem) anova(model1) # check normality of residuals x11() qqnorm(model1$residuals) # Some other model summary statistics, including coefficients for the # "reference cell" parameterization  here Diet A is the reference category summary(model1) # Contrast : planned comparison Sheet1 Page 2 n<c(4,4,4,4) #number of sample in each group a<c(3,1,1,1) #contrast coefficients c<sum(a*smean) sp<sqrt(2.78) #pooled sample variance is the MSE from anova table se<sp*sqrt(sum(a^2/n)) t<c/se df<12 pvalue<1pt(t,df) #Another way to do contrast test : install the package "gregmisc" library(gregmisc) fit.contrast(model1,nem,c(3,1,1,1)) # Multiple comparisons, with simultaneous confidence level of 95% for the 6 comparisons TukeyHSD(aov(model1)) # plot the simultaneous confidence intervals for differences plot(TukeyHSD(aov(model1))) # for more information enter "help(TukeyHSD)"...
View
Full
Document
This note was uploaded on 09/11/2011 for the course STAT 200 taught by Professor Agniel during the Spring '09 term at University of Illinois at Urbana–Champaign.
 Spring '09
 Agniel

Click to edit the document details