hw5_update - 5.7 > engineer<-read.table"C/Documents and...

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

View Full Document Right Arrow Icon
5.7 > engineer<-read.table("C:/Documents and Settings/Ester Kim/My Documents/Escola/appl stats/hw5/prb0507.dat",header=T) > engineer run x1 x2 x3 y 1 1 -1 -1 -1 60 2 2 1 -1 -1 61 3 3 -1 1 -1 54 4 4 1 1 -1 75 5 5 -1 -1 1 58 6 6 1 -1 1 61 7 7 -1 1 1 55 8 8 1 1 1 75 > engineer<-data.frame(apply(engineer[,2:4],2,as.factor),y=engineer[,5]) > plot.design(engineer) 58 60 62 64 66 68 Factors mean of y -1 1 -1 1 -1 1 x1 x2 x3 > interaction.plot(engineer$x1,engineer$x2,engineer$y) > interaction.plot(engineer$x1,engineer$x3,engineer$y) > interaction.plot(engineer$x2,engineer$x3,engineer$y) 55 60 65 70 75 engineer$x1 mean of engineer$y -1 1 engineer$x2 1 -1 58 60 62 64 66 68 engineer$x1 mean of engineer$y -1 1 engineer$x3 -1 1 60 61 62 63 64 65 engineer$x2 mean of engineer$y -1 1 engineer$x3 1 -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
> fit<-aov(y~x1*x2*x3,data=engineer) > summary(fit) Df Sum Sq Mean Sq x1 1 253.125 253.125 x2 1 45.125 45.125 x3 1 0.125 0.125 x1:x2 1 171.125 171.125 x1:x3 1 0.125 0.125 x2:x3 1 1.125 1.125 x1:x2:x3 1 1.125 1.125 > model.tables(fit,type="effects",se=F) Tables of effects x1 -1 1 -5.625 5.625 x2 -1 1 -2.375 2.375 x3 -1 1 0.125 -0.125 x1:x2 -1 1 4.625 -4.625 -4.625 4.625 x1:x3 -1 1 0.125 -0.125 -0.125 0.125 x2:x3 -1 1 0.375 -0.375 -0.375 0.375 x1: x2: x3 -1 1 0.375 -0.375 -0.375 0.375 Standard errors of effects x1 x2 x3 x1:x2 x1:x3 x2:x3 x1:x2:x3 NaN NaN NaN NaN NaN NaN NaN replic. 4 4 4 2 2 2 1 P-values are NA > fit1<-lm(y~x1+x2 +x1:x2, data=engineer) > summary(fit1) lm(formula = y ~ x1 + x2 + x1:x2, data = engineer) Residuals: 1 2 3 4 5 6 7 8 1.000e+00 3.379e-16 -5.000e-01 3.934e-16 -1.000e+00 -3.838e-16 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 62.3750 0.2795 223.160 2.42e-09 *** x1 5.6250 0.2795 20.125 3.60e-05 *** x2 2.3750 0.2795 8.497 0.00105 ** x1:x2 4.6250 0.2795 16.547 7.81e-05 ***
Image of page 2
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.7906 on 4 degrees of freedom Multiple R-Squared: 0.9947, Adjusted R-squared: 0.9907
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
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