> tapply(tstrength,casting,mean) 1 2 3 90.37 88.43 93.80 > > tapply(tstrength,casting,sd) 1 2 3 2.869011 2.456307 1.786368 > > ex_05_01.mod1 <- aov(tstrength ~ casting) > > summary(ex_05_01.mod1) Df Sum Sq Mean Sq F value Pr(>F) casting 2 147.88 73.942 12.708 0.0001290 *** Residuals 27 157.10 5.819 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > library(nlme) > > ex_05_01.mod2 <- lme(fixed=tstrength~1,random=~1|casting) > > summary(ex_05_01.mod2) Linear mixed-effects model fit by REML Data: NULL AIC BIC logLik 147.8548 151.9567 -70.92739 Random effects: Formula: ~1 | casting (Intercept) Residual StdDev: 2.610052 2.412176 Fixed effects: tstrength ~ 1 Value Std.Error DF t-value p-value (Intercept) 90.86667 1.569951 27 57.87868 0 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -1.8278448 -0.6456062 -0.1613183 0.9499303 1.8203137 Number of Observations: 30 Number of Groups: 3 > > library(lme4) Loading required package: Matrix Loading required package: lattice Attaching package: 'Matrix' The following object(s) are masked from 'package:base': det Attaching package: 'lme4' The following object(s) are masked from 'package:nlme': BIC, lmList, VarCorr The following object(s) are masked from 'package:stats': AIC Warning message: package 'lme4' was built under R version 2.12.1 > > ex_05_01.mod3 <- lmer(tstrength~1+(1|casting)) > > summary(ex_05_01.mod3) Linear mixed model fit by REML Formula: tstrength ~ 1 + (1 | casting) AIC BIC logLik deviance REMLdev 147.9 152.1 -70.93 144.6 141.9 Random effects: Groups Name Variance Std.Dev. casting (Intercept) 6.8124 2.6101 Residual 5.8186 2.4122 Number of obs: 30, groups: casting, 3 Fixed effects: Estimate Std. Error t value (Intercept) 90.87 1.57 57.88