> pba.aov <- aov(score ~ oil*bowler*tourney) > > summary(pba.aov) Df Sum Sq Mean Sq F value Pr(>F) oil 4 337.1 84.27 157.858 < 2e-16 *** bowler 36 84.4 2.35 4.394 9.55e-15 *** tourney 10 97.7 9.77 18.293 < 2e-16 *** oil:bowler 144 129.3 0.90 1.682 1.67e-05 *** bowler:tourney 360 321.1 0.89 1.671 2.72e-08 *** Residuals 555 296.3 0.53 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > library(lmerTest) > > pba.mod1 <- lmer(score ~ oil + (1|bowler) + (1|oil:bowler) + + (1|oil:tourney) + (1|bowler:oil:tourney)) > > summary(pba.mod1) Linear mixed model fit by REML t-tests use Satterthwaite approximations to degrees of freedom [lmerMod] Formula: score ~ oil + (1 | bowler) + (1 | oil:bowler) + (1 | oil:tourney) + (1 | bowler:oil:tourney) REML criterion at convergence: 2811.3 Scaled residuals: Min 1Q Median 3Q Max -2.97531 -0.60501 0.00816 0.64515 3.01851 Random effects: Groups Name Variance Std.Dev. bowler:oil:tourney (Intercept) 0.178998 0.42308 oil:bowler (Intercept) 0.001043 0.03229 bowler (Intercept) 0.048254 0.21967 oil:tourney (Intercept) 0.119908 0.34628 Residual 0.533810 0.73062 Number of obs: 1110, groups: bowler:oil:tourney, 555; oil:bowler, 185; bowler, 37; oil:tourney, 15 Fixed effects: Estimate Std. Error df t value Pr(>|t|) (Intercept) 15.4356 0.2129 10.6020 72.508 1.33e-15 *** oil2 0.4689 0.2967 10.0050 1.580 0.14510 oil3 0.3714 0.2967 10.0050 1.252 0.23913 oil4 -1.0830 0.2967 10.0050 -3.650 0.00446 ** oil5 -0.1148 0.2967 10.0050 -0.387 0.70697 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Correlation of Fixed Effects: (Intr) oil2 oil3 oil4 oil2 -0.697 oil3 -0.697 0.500 oil4 -0.697 0.500 0.500 oil5 -0.697 0.500 0.500 0.500 > anova(pba.mod1) Analysis of Variance Table of type III with Satterthwaite approximation for degrees of freedom Sum Sq Mean Sq NumDF DenDF F.value Pr(>F) oil 18.414 4.6035 4 10.005 8.6239 0.002792 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > if(require(pbkrtest)) + anova(pba.mod1, ddf = "Kenward-Roger") Analysis of Variance Table of type III with Kenward-Roger approximation for degrees of freedom Sum Sq Mean Sq NumDF DenDF F.value Pr(>F) oil 18.414 4.6035 4 10.005 8.6239 0.002792 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > lsmeans(pba.mod1) Least Squares Means table: oil Estimate Standard Error DF t-value Lower CI Upper CI p-value oil 1 1.0 15.436 0.213 10.6 72.510 15.0 15.9 <2e-16 *** oil 2 2.0 15.905 0.213 10.6 74.710 15.4 16.4 <2e-16 *** oil 3 3.0 15.807 0.213 10.6 74.250 15.3 16.3 <2e-16 *** oil 4 4.0 14.353 0.213 10.6 67.420 13.9 14.8 <2e-16 *** oil 5 5.0 15.321 0.213 10.6 71.970 14.9 15.8 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > difflsmeans(pba.mod1) Differences of LSMEANS: Estimate Standard Error DF t-value Lower CI Upper CI p-value oil 1 - 2 -0.5 0.2967 10.0 -1.58 -1.1299 0.192 0.145 oil 1 - 3 -0.4 0.2967 10.0 -1.25 -1.0324 0.290 0.239 oil 1 - 4 1.1 0.2967 10.0 3.65 0.4220 1.744 0.004 ** oil 1 - 5 0.1 0.2967 10.0 0.39 -0.5463 0.776 0.707 oil 2 - 3 0.1 0.2967 10.0 0.33 -0.5636 0.758 0.749 oil 2 - 4 1.6 0.2967 10.0 5.23 0.8909 2.213 4e-04 *** oil 2 - 5 0.6 0.2967 10.0 1.97 -0.0774 1.245 0.077 . oil 3 - 4 1.5 0.2967 10.0 4.90 0.7934 2.115 6e-04 *** oil 3 - 5 0.5 0.2967 10.0 1.64 -0.1749 1.147 0.132 oil 4 - 5 -1.0 0.2967 10.0 -3.26 -1.6293 -0.307 0.008 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > >