Chapter Contents |
Previous |
Next |
The GLM Procedure |
data twoway; input Treatment Block y @@; datalines; 1 1 17 1 1 28 1 1 19 1 1 21 1 1 19 1 2 43 1 2 30 1 2 39 1 2 44 1 2 44 1 3 16 2 1 21 2 1 21 2 1 24 2 1 25 2 2 39 2 2 45 2 2 42 2 2 47 2 3 19 2 3 22 2 3 16 3 1 22 3 1 30 3 1 33 3 1 31 3 2 46 3 3 26 3 3 31 3 3 26 3 3 33 3 3 29 3 3 25 ; title1 "Unbalanced Two-way Design"; ods select ModelANOVA Means LSMeans; proc glm data=twoway; class Treatment Block; model y = Treatment|Block;
means Treatment; lsmeans Treatment; run; ods select all;
The ANOVA results are shown in Figure 30.14.
|
|
No matter how you look at it, this data exhibits a strong effect due to the blocks (F-test p < 0.0001) and no significant interaction between treatments and blocks (F-test p > 0.7). But the lack of balance affects how the treatment effect is interpreted: in a main-effects-only model, there are no significant differences between the treatment means themselves (Type I F-test p > 0.7), but there are highly significant differences between the treatment means corrected for the block effects (Type III F-test p < 0.01).
LS-means are, in effect, within-group means appropriately adjusted for the other effects in the model. More precisely, they estimate the marginal means for a balanced population (as opposed to the unbalanced design). For this reason, they are also called estimated population marginal means by Searle, Speed, and Milliken (1980). In the same way that the Type I F-test assesses differences between the arithmetic treatment means (when the treatment effect comes first in the model), the Type III F-test assesses differences between the LS-means. Accordingly, for the unbalanced two-way design, the discrepancy between the Type I and Type III tests is reflected in the arithmetic treatment means and treatment LS-means, as shown in Figure 30.15 and Figure 30.16. See the section "Construction of Least-Squares Means" for more on LS-means.
Note that, while the arithmetic means are always uncorrelated (under the usual assumptions for analysis of variance), the LS-means may not be. This fact complicates the problem of multiple comparisons for LS-means; see the following section.
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.