RandomBlockDesignsWu - One-way Layout and Randomized Block...

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

View Full Document Right Arrow Icon
One-way Layout and Randomized Block Design One-way layout: The Pulp dataset comes from table 2.1 in Wu and Hamada (2009). > loc <- "http://www2.isye.gatech.edu/~jeffwu/book/data/pulp.dat" > pulp <- read.table(url(loc), header = TRUE) > y <- as.numeric(as.matrix(pulp)) > operator <- as.factor(c(rep("A", 5), rep("B",5), rep("C", 5),rep("D",5))) > boxplot(y ~ operator) A B C D 59 .8 60 .0 60 .2 60 .4 60 .6 60 .8 61 .0 > m0 <- lm(y ~ operator) Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 60.2400 0.1458 413.243 <2e-16 *** operatorB -0.1800 0.2062 -0.873 0.3955 operatorC 0.3800 0.2062 1.843 0.0839 . operatorD 0.4400 0.2062 2.134 0.0486 * --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.326 on 16 degrees of freedom Multiple R-squared: 0.4408, Adjusted R-squared: 0.3359 F-statistic: 4.204 on 3 and 16 DF, p-value: 0.02261 > model.matrix(m0) (Intercept) operatorB operatorC operatorD 1 1 0 0 0 2 1 0 0 0 3 1 0 0 0 4 1 0 0 0 5 1 0 0 0 6 1 1 0 0 7 1 1 0 0 8 1 1 0 0 9 1 1 0 0 10 1 1 0 0 11 1 0 1 0 12 1 0 1 0 13 1 0 1 0 14 1 0 1 0 15 1 0 1 0 16 1 0 0 1 17 1 0 0 1 18 1 0 0 1 19 1 0 0 1 20 1 0 0 1
Image of page 1

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

View Full Document Right Arrow Icon
> options(contrasts=c("contr.sum", "contr.poly")) > m1 <- lm(y ~ operator)
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern