hw5_update

hw5_update - 5.7 >...

Info iconThis 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 65 70 75 engineer$x1 mean of engineer$y -1 1 engineer$x2 1 -1 engineer$x1 -1 1 engineer$x3 -1 1 61 63 engineer$x2 -1 1 engineer$x3 1 -1
Background image of page 1

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

View Full DocumentRight 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 ***
Background 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
Background image of page 3

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

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

Page1 / 8

hw5_update - 5.7 &gt;...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online