> tapply(strength,list(aggtype,compmeth),mean) S R L V B 65.33333 129 97.33333 57.33333 S 67.66667 111 60.66667 41.66667 > tapply(strength,list(aggtype,compmeth),sd) S R L V B 2.516611 3.605551 4.041452 1.527525 S 2.886751 4.582576 2.081666 2.081666 > > concrete.mod1 <- aov(strength ~ aggtype*compmeth) > > anova(concrete.mod1) Analysis of Variance Table Response: strength Df Sum Sq Mean Sq F value Pr(>F) aggtype 1 1734 1734.0 182.526 3.628e-10 *** compmeth 3 16244 5414.5 569.947 < 2.2e-16 *** aggtype:compmeth 3 1145 381.7 40.175 1.124e-07 *** Residuals 16 152 9.5 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > summary.lm(concrete.mod1) Call: aov(formula = strength ~ aggtype * compmeth) Residuals: Min 1Q Median 3Q Max -4.3333 -1.6667 -0.6667 2.3333 5.0000 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 78.7500 0.6292 125.168 < 2e-16 *** aggtype1 8.5000 0.6292 13.510 3.63e-10 *** compmeth1 -12.2500 1.0897 -11.241 5.27e-09 *** compmeth2 41.2500 1.0897 37.854 < 2e-16 *** compmeth3 0.2500 1.0897 0.229 0.821 aggtype1:compmeth1 -9.6667 1.0897 -8.871 1.42e-07 *** aggtype1:compmeth2 0.5000 1.0897 0.459 0.653 aggtype1:compmeth3 9.8333 1.0897 9.024 1.12e-07 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 3.082 on 16 degrees of freedom Multiple R-squared: 0.9921, Adjusted R-squared: 0.9887 F-statistic: 287.6 on 7 and 16 DF, p-value: 1.305e-15 > > library(gmodels) Warning message: package 'gmodels' was built under R version 2.12.1 > > concrete.mod2 <- lm(strength ~ aggtype:compmeth + 0) > > summary(concrete.mod2) Call: lm(formula = strength ~ aggtype:compmeth + 0) Residuals: Min 1Q Median 3Q Max -4.3333 -1.6667 -0.6667 2.3333 5.0000 Coefficients: Estimate Std. Error t value Pr(>|t|) aggtypeB:compmethS 65.33 1.78 36.71 < 2e-16 *** aggtypeS:compmethS 67.67 1.78 38.02 < 2e-16 *** aggtypeB:compmethR 129.00 1.78 72.49 < 2e-16 *** aggtypeS:compmethR 111.00 1.78 62.38 < 2e-16 *** aggtypeB:compmethL 97.33 1.78 54.70 < 2e-16 *** aggtypeS:compmethL 60.67 1.78 34.09 2.28e-16 *** aggtypeB:compmethV 57.33 1.78 32.22 5.57e-16 *** aggtypeS:compmethV 41.67 1.78 23.41 8.31e-14 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 3.082 on 16 degrees of freedom Multiple R-squared: 0.9991, Adjusted R-squared: 0.9986 F-statistic: 2210 on 8 and 16 DF, p-value: < 2.2e-16 > > contrasts.mod2 <- rbind( + 'B vs S in Static ' = c(1,-1,0,0,0,0,0,0), + 'B vs S in Regular ' = c(0,0,1,-1,0,0,0,0), + 'B vs S in Low ' = c(0,0,0,0,1,-1,0,0), + 'B vs S in Very Low ' = c(0,0,0,0,0,0,1,-1)) > > estimable(concrete.mod2,contrasts.mod2) Estimate Std. Error t value DF Pr(>|t|) B vs S in Static -2.333333 2.516611 -0.9271726 16 3.676127e-01 B vs S in Regular 18.000000 2.516611 7.1524747 16 2.296669e-06 B vs S in Low 36.666667 2.516611 14.5698559 16 1.181089e-10 B vs S in Very Low 15.666667 2.516611 6.2253021 16 1.214107e-05 > >