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 Twoway Design"; ods select ModelANOVA Means LSMeans; proc glm data=twoway; class Treatment Block; model y = TreatmentBlock;
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 (Ftest p < 0.0001) and no significant interaction between treatments and blocks (Ftest p > 0.7). But the lack of balance affects how the treatment effect is interpreted: in a maineffectsonly model, there are no significant differences between the treatment means themselves (Type I Ftest p > 0.7), but there are highly significant differences between the treatment means corrected for the block effects (Type III Ftest p < 0.01).
LSmeans are, in effect, withingroup 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 Ftest assesses differences between the arithmetic treatment means (when the treatment effect comes first in the model), the Type III Ftest assesses differences between the LSmeans. Accordingly, for the unbalanced twoway design, the discrepancy between the Type I and Type III tests is reflected in the arithmetic treatment means and treatment LSmeans, as shown in Figure 30.15 and Figure 30.16. See the section "Construction of LeastSquares Means" for more on LSmeans.
Note that, while the arithmetic means are always uncorrelated (under the usual assumptions for analysis of variance), the LSmeans may not be. This fact complicates the problem of multiple comparisons for LSmeans; see the following section.
Chapter Contents 
Previous 
Next 
Top 
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.