> tapply(y, trt, mean) # marginal mean for y pp mp cp mps control 28.83333 27.83333 30.33333 28.66667 26.33333 > tapply(x, trt, mean) # marginal mean for x pp mp cp mps control 23.00000 25.16667 22.00000 25.00000 25.66667 > > mean(x) [1] 24.16667 > > # Fit Model with Interaction > trombone1.aov <- lm(y ~ x + pp + mp + cp + mps + ppx + mpx + cpx +mpsx) > > summary(trombone1.aov) Call: lm(formula = y ~ x + pp + mp + cp + mps + ppx + mpx + cpx + mpsx) Residuals: Min 1Q Median 3Q Max -4.9160 -1.2527 -0.0376 1.0884 3.0191 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -4.1336 6.0508 -0.683 0.5023 x 1.1870 0.2332 5.091 5.58e-05 *** pp 17.6575 6.7271 2.625 0.0162 * mp 15.0516 9.8270 1.532 0.1413 cp 13.2526 10.9310 1.212 0.2395 mps 16.9400 7.3048 2.319 0.0311 * ppx -0.5214 0.2631 -1.982 0.0614 . mpx -0.5149 0.3844 -1.339 0.1955 cpx -0.2227 0.4733 -0.471 0.6430 mpsx -0.5526 0.2827 -1.955 0.0647 . --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 2.179 on 20 degrees of freedom Multiple R-squared: 0.8225, Adjusted R-squared: 0.7427 F-statistic: 10.3 on 9 and 20 DF, p-value: 9.164e-06 > > # Fit Model without Interaction > trombone2.aov <- lm(y ~ x + pp + mp + cp + mps) > > summary(trombone2.aov) Call: lm(formula = y ~ x + pp + mp + cp + mps) Residuals: Min 1Q Median 3Q Max -4.4156 -0.7855 -0.0574 1.1560 4.2078 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.39995 2.37356 3.118 0.00468 ** x 0.73766 0.08549 8.628 8.07e-09 *** pp 4.46710 1.29984 3.437 0.00215 ** mp 1.86883 1.28041 1.460 0.15738 cp 6.70477 1.31753 5.089 3.32e-05 *** mps 2.82511 1.28096 2.205 0.03725 * --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 2.216 on 24 degrees of freedom Multiple R-squared: 0.7797, Adjusted R-squared: 0.7338 F-statistic: 16.99 on 5 and 24 DF, p-value: 3.371e-07 > vcov(trombone2.aov) (Intercept) x pp mp cp (Intercept) 5.6337865 -0.18759662 -1.31906414 -0.91260479 -1.50666077 x -0.1875966 0.00730896 0.01949056 0.00365448 0.02679952 pp -1.3190641 0.01949056 1.68958778 0.82855176 0.89027186 mp -0.9126048 0.00365448 0.82855176 1.63944020 0.83220624 cp -1.5066608 0.02679952 0.89027186 0.83220624 1.73587786 mps -0.9438709 0.00487264 0.83180018 0.82124280 0.83667282 mps (Intercept) -0.94387089 x 0.00487264 pp 0.83180018 mp 0.82124280 cp 0.83667282 mps 1.64086138 > > # Fit Model without treatment effects > trombone3.aov <- lm(y ~ x) > > summary(trombone3.aov) Call: lm(formula = y ~ x) Residuals: Min 1Q Median 3Q Max -8.2457 -1.7272 0.4491 2.0360 4.3123 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 13.6458 2.7901 4.891 3.74e-05 *** x 0.6105 0.1131 5.397 9.37e-06 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 3.061 on 28 degrees of freedom Multiple R-squared: 0.5099, Adjusted R-squared: 0.4924 F-statistic: 29.13 on 1 and 28 DF, p-value: 9.368e-06 >