
i
i
“K23166” — 2015/1/28 — 9:35 — page 87 — #113
i
i
i
i
i
i
6.6. EXAMPLES 87
The AIC criterion also suggests that the model without the interaction is most appropriate.
It may be useful to change the default reference level for variables. The default R design
matrix (see 6.1.4) can be changed and the model re-fit.
> contrasts(ds$sub) = contr.SAS(3)
> aov3 = lm(cesd ~ sub + genf, data=ds)
> summary(aov3)
Call:
lm(formula = cesd ~ sub + genf, data = ds)
Residuals:
Min 1Q Median 3Q Max
-32.13 -8.85 1.09 8.48 27.09
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 33.52 1.38 24.22 < 2e-16
sub1 5.61 1.46 3.83 0.00014
sub2 5.32 1.34 3.98 8.1e-05
genfM -5.62