|
Chapter Contents |
Previous |
Next |
| The GLM Procedure |
LS-means are predicted population margins; that is, they estimate the marginal means over a balanced population. In a sense, LS-means are to unbalanced designs as class and subclass arithmetic means are to balanced designs. Each LS-mean is computed as L'b for a certain column vector L, where b is the vector of parameter estimates -that is, the solution of the normal equations. For further information, see the section "Construction of Least-Squares Means".
Multiple effects can be specified in one LSMEANS statement, or multiple LSMEANS statements can be used, but they must all appear after the MODEL statement. For example,
proc glm;
class A B;
model Y=A B A*B;
lsmeans A B A*B;
run;
LS-means are displayed for each level of the A, B, and A*B effects.
You can specify the following options in the LSMEANS statement after a slash:
The BON (Bonferroni) and SIDAK adjustments involve correction factors described in the "Multiple Comparisons" section and in Chapter 39, "The MULTTEST Procedure." When you specify ADJUST=TUKEY and your data are unbalanced, PROC GLM uses the approximation described in Kramer (1956) and identifies the adjustment as "Tukey-Kramer" in the results. Similarly, when you specify ADJUST=DUNNETT and the LS-means are correlated, PROC GLM uses the factor-analytic covariance approximation described in Hsu (1992) and identifies the adjustment as "Dunnett-Hsu" in the results. The preceding references also describe the SCHEFFE and SMM adjustments.
The SIMULATE adjustment computes the adjusted p-values from the simulated
distribution of the maximum or maximum absolute value of a multivariate
t random vector. The simulation estimates q, the true
th quantile, where
is
the confidence coefficient. The default
is the value of the
ALPHA= option in the PROC GLM statement or 0.05 if that option is not
specified. You can change this value with the ALPHA= option in the
LSMEANS statement.
The number of samples for the SIMULATE adjustment is set so that the tail area
for the simulated q is within a certain accuracy radius
of
with
an accuracy confidence of
%. In equation form,

You can specify the following simoptions in parentheses after the ADJUST=SIMULATE option.
The BYLEVEL option modifies the observed-margins LS-means. Instead of computing the margins across the entire data set, the procedure computes separate margins for each level of the LS-mean effect in question. The resulting LS-means are actually equal to raw means in this case. If you specify the BYLEVEL option, it disables the AT option.
To specify which levels of the effects are the controls, list the quoted formatted values in parentheses after the keyword CONTROL. For example, if the effects A, B, and C are class variables, each having two levels, '1' and '2', the following LSMEANS statement specifies the '1' '2' level of A*B and the '2' '1' level of B*C as controls:
lsmeans A*B B*C / pdiff=control('1' '2', '2' '1');
For multiple effect situations such as this one, the ordering
of the list is significant, and you should check the
output to make sure that the controls are correct.
Two-tailed tests and confidence limits are associated with the CONTROL difftype. For one-tailed results, use either the CONTROLL or CONTROLU difftype. The CONTROLL difftype tests whether the noncontrol levels are significantly less than the control; the lower confidence limits for the control minus the noncontrol levels are considered to be minus infinity. Conversely, the CONTROLU difftype tests whether the noncontrol levels are significantly greater than the control; the upper confidence limits for the noncontrol levels minus the control are considered to be infinity.
The default multiple comparisons adjustment for each difftype is shown in the following table.
| difftype | Default ADJUST= |
| Not specified | T |
| ALL | TUKEY |
| CONTROL | |
| CONTROLL | DUNNETT |
| CONTROLU |
For example, in order to compute one-sided confidence limits for differences with a control, adjusted according to Dunnett's procedure, the following statements are equivalent:
lsmeans Treatment / pdiff=controll cl; lsmeans Treatment / pdiff=controll cl adjust=dunnett;
lsmeans A*B / slice=B;This code tests for the simple main effects of A for B, which are calculated by extracting the appropriate rows from the coefficient matrix for the A*B LS-means and using them to form an F-test as performed by the CONTRAST statement.
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.