> ## Table 9.3 and 9.4 > dat=read.table("table9_3.dat", h=F) > dat V1 V2 V3 V4 1 1 -1 -1 65.60 2 2 -1 1 45.59 3 3 1 -1 78.72 4 4 1 1 62.96 5 5 0 0 64.78 6 6 0 0 64.33 7 7 2 2(-1.173) 89.73 8 8 4 4(-1.173) 93.04 9 9 6 6(-1.173) 75.06 > time=dat[,2] > temp=c(-1, 1, -1, 1, 0, 0, -1.173*2, -1.173*4, -1.173*6) > yield=dat[,4] > g=lm(yield ~ time + temp + time:temp + I(time^2), subset=1:6) # model (9.12) using the first 6 runs only > summary(g) # Table 9.4 Call: lm(formula = yield ~ time + temp + time:temp + I(time^2), subset = 1:6) Residuals: 1 2 3 4 5 6 1.184e-17 -2.296e-17 -2.367e-17 1.222e-17 2.250e-01 -2.250e-01 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 64.5550 0.2250 286.911 0.00222 ** time 7.6225 0.1591 47.910 0.01329 * temp -8.9425 0.1591 -56.207 0.01133 * I(time^2) -1.3375 0.2756 -4.854 0.12935 time:temp 1.0625 0.1591 6.678 0.09462 . --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: 0.3182 on 1 degrees of freedom Multiple R-Squared: 0.9998, Adjusted R-squared: 0.9991 F-statistic: 1381 on 4 and 1 DF, p-value: 0.02018