-
ADJUST=method
-
computes a multiple comparison adjustment for the p-values and
confidence limits for the differences of LS-means. The adjusted quantities are produced along with the unadjusted quantities. The adjust= option works together with the diff option. If you omit the diff option and specify a method other than NONE, then the adjust= option invokes the diff option.
You must specify one of the following methods for the adjust= option:
-
BON
performs Bonferroni t tests of differences between LS-means. The method involves correction factors described in Chapter 53, The GLM Procedure (SAS/STAT User's Guide), and Chapter 86, The MULTTEST Procedure (SAS/STAT User's Guide); also see Westfall and Young (1993) and Westfall et al. (1999).
-
DUNNETT
performs Dunnett’s t test, which tests whether any treatments are significantly different from a single control for the effects in the lsmeans statement. When the LS-means are correlated, the procedure uses the factor-analytic covariance approximation described in Hsu (1992) and identifies the adjustment as "Dunnett-Hsu" in the results.
The approximation derives approximate "effective sample sizes" for which exact critical values are computed.
-
NELSON
performs Nelson’s t test of each LS-mean against an average of the LS-means (Ott 1967; Nelson 1982, 1991, 1993). When the LS-means are correlated, the procedure uses the factor-analytic covariance approximation described in Hsu (1992) and identifies the adjustment as "Nelson-Hsu" in the results. The approximation derives approximate "effective sample sizes" for which exact critical values are computed.
-
NONE | T
performs no adjustment for multiple comparisons.
-
SCHEFFE
performs Scheffé’s multiple comparison procedure.
-
SIDAK
performs pairwise t tests on differences between LS-means with levels adjusted according to Šidák’s inequality. The method involves correction factors described in Chapter 53, The GLM Procedure (SAS/STAT User's Guide), and Chapter 86, The MULTTEST Procedure (SAS/STAT User's Guide); also see Westfall and Young (1993) and Westfall et al. (1999).
-
SIMULATE <( simopts )>
-
performs the simulation-based multiple comparison procedure. This method computes adjusted p-values and confidence limits from the simulated distribution of the maximum or maximum absolute value of a multivariate t random vector. All covariance parameters, except the residual scale parameter, are fixed at their estimated values throughout the simulation, potentially resulting in some underdispersion. The simulation estimates q, the true
quantile, where
is the confidence coefficient. The default value of
is 0.05; you can change this value by specifying the alpha= option in the lsmeans statement.
The number of samples is set so that the tail area for the simulated q is within
of
with
% confidence. In equation form,
where
is the simulated q and F is the true distribution function of the maximum; see Edwards and Berry (1987) for details. By default,
= 0.005 and
= 0.01, placing the tail area of
within 0.005 of 0.95 with 99% confidence.
You can specify the following simopts options in parentheses after the ADJUST=SIMULATE option:
-
ACC=value
specifies the target accuracy radius
of a
% confidence interval for the true probability content of the estimated
quantile. By default, ACC=0.005. Note that if you also specify the CVADJUST simoption, then the actual accuracy radius will probably be substantially less than this target.
-
CVADJUST
estimates the quantile by the control variate adjustment method of Hsu and Nelson (1998) instead of simply as the quantile of the simulated sample. Specifying this option usually has the effect of significantly reducing the accuracy radius
of a
% confidence interval for the true probability content of the estimated
quantile. The control-variate-adjusted quantile estimate takes approximately twice as long to compute, but it is typically much more accurate than the sample quantile.
-
EPS=value
specifies the value
for a
% confidence interval for the true probability content of the estimated
quantile. The default value of the accuracy confidence is 99%, corresponding to EPS=0.01.
-
NSAMP=n
specifies the sample size for the simulation. By default, n is set by a formula that is based on the values of the target accuracy radius
and accuracy confidence
% for an interval for the true probability content of the estimated
quantile. When the default values are used for
,
, and
(0.005, 0.01, and 0.05, respectively), NSAMP=12605. If you omit the NSAMP= option or specify NSAMP=0, the default sample size is used.
-
REPORT
displays a report on the simulation, including a listing of the parameters, such as
,
, and
, as well as an analysis of various methods of estimating or approximating the quantile.
-
SEED=number
specifies an integer to be used to start the pseudorandom number generator for the simulation. If you do not specify a seed, or if you specify a number less than or equal to 0, the seed is generated by reading the time of day from the computer’s clock.
-
SMM | GT2
performs pairwise comparisons based on the studentized maximum modulus and Šidák’s uncorrelated-t inequality, yielding Hochberg’s GT2 method when sample sizes are unequal.
-
T | NONE
performs no adjustment for multiple comparisons.
-
TUKEY
performs Tukey’s studentized range test on LS-means. When your data are unbalanced, the procedure uses the approximation described in Kramer (1956) and identifies the adjustment as "Tukey-Kramer" in the results.
By default, ADJUST=NONE.
If you specify ADJUST=DUNNETT, the procedure analyzes all differences with the first control level unless you have specified a different control level. If you specify ADJUST=NELSON, then diff=ANOM is assumed.
If you specify ADJUST=TUKEY, then diff=ALL is assumed. If you specify other methods, then the procedure performs all pairwise differences unless you specify the diff option.
Note that computing the exact adjusted p-values and critical values for unbalanced designs can be computationally intensive, especially for ADJUST=NELSON.
-
ALPHA=number
specifies that a confidence interval be constructed for
each of the LS-means with confidence level
. The value of number is between 0 and 1; the default is 0.05.
-
AT at-specification
-
enables you to modify the values of the covariates that are used in computing
LS-means. By default, all covariates are set equal to their mean values for computing standard LS-means. The at option enables you to assign arbitrary values to the covariates. Additional columns in the output table indicate the values of the covariates.
You can specify the following at-specifications:
-
MEANS
sets covariates equal to their mean values (as with standard LS-means) and applies this adjustment to crossproducts of covariates.
-
variable=value
sets the covariate variable equal to value.
-
(variable-list)=(value-list)
sets covariates in the variable-list equal to values in the value-list.
Consider the following example:
class A B;
model Y = A*B x1 x2 x1*x2;
LSMEANS A*B;
LSMEANS A*B / at means;
LSMEANS A*B / at x1=1.2;
LSMEANS A*B / at (x1 x2)=(1.2 0.3);
For the first two LSMEANS statements, the LS-means coefficient of x1 is
(the mean of x1) and of x2 is
(the mean of x2). For the first LSMEANS statement, the coefficient of x1*x2 is
. However, for the second LSMEANS statement, the coefficient is
. The third LSMEANS statement sets the coefficient of x1 equal to 1.2 and leaves it at
for x2, and the final LSMEANS statement sets these values to 1.2 and 0.3, respectively.
Even if you specify a weight variable, the unweighted covariate means are used for the covariate coefficients if you omit the at option. If you specify the at option, then weight and frequency variables are taken into account as follows. The weighted covariate means are used for the covariate coefficients for which no explicit at option values are given, or if you specify the AT MEANS option. Observations that do not contribute to the analysis because of a missing dependent variable are used in computing the covariate means. You should use the e option in conjunction with the at option to verify that the modified LS-means coefficients are the ones that you want.
-
ATVAR at-specification
is the same as the AT option, except that it is required when you restore a model from an item store but do not provide a data table. This option is available with the GENSELECT and LOGSELECT procedures.
-
CL
constructs confidence limits for each of the LS-means.
The LMIXED procedure computes t-type limits, whereas other procedures compute normal (z) intervals. If you specify the DDFM=NONE option in the MODEL statement in PROC LMIXED, then infinite degrees of freedom are used for this test, which essentially computes a z interval. The confidence level is 0.95 by default; you can change the level by specifying the alpha= option.
-
CORR
displays the estimated correlation matrix of the least squares means
as part of the "Least Squares Means" table.
-
COV
displays the estimated covariance matrix of the least squares means
as part of the "Least Squares Means" table.
-
DF=number
specifies the degrees of freedom for the t test and
confidence limits. The default is the residual degrees of freedom that you define by specifying the DDFM=RESIDUAL option in the MODEL statement in the LMIXED procedure. This option is available only for PROC LMIXED.
-
DIFF<=difftype>
-
displays differences of the LS-means in the
"Differences of Least Squares Means" table. You can specify the following values for the optional difftype:
-
ALL
displays all pairwise differences.
-
ANOM
displays differences between each LS-mean and the average LS-mean, as in the analysis of means (Ott 1967). The average is computed as a weighted mean of the LS-means, with the weights being inversely proportional to the diagonal entries of the
matrix. When you specify a weight statement, the preceding matrix is replaced with
, where
is the diagonal matrix that contains the weights. If LS-means are nonestimable, this design-based weighted mean is replaced with an equally weighted mean. Note that the ANOM procedure in SAS/QC software implements both tables and graphics for the analysis of means with a variety of response types. For one-way designs and normally distributed data, the ANOM computations are equivalent to the results of PROC ANOM.
-
CONTROL<('level1'<,'level2',…>)>
-
produces two-tailed tests and confidence limits for differences with a control; by default, the control is the first level of each specified LS-mean effect. To specify which levels of the effects are the controls, list the quoted formatted values in parentheses after the CONTROL keyword. For example, if the effects A, B, and C are classification 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 / diff=control('1' '2', '2' '1');
For multiple effects, the results depend on the order of the list, so you should check the output to make sure that the controls are correct.
-
CONTROLL
produces one-tailed results and tests whether the noncontrol levels are significantly smaller than the control. The upper confidence limits for the control minus the noncontrol levels are considered to be infinity and are displayed as missing.
-
CONTROLU
produces one-tailed results and tests whether the noncontrol levels are significantly larger than the control. The upper confidence limits for the noncontrol levels minus the control are considered to be infinity and are displayed as missing.
-
E
displays the matrix coefficients for all LS-mean effects
in the "Matrix Coefficients" table.
-
PDIFF<=difftype>
is the same as the DIFF option.
-
SINGULAR=number
tunes the estimability checking. If
is a vector, define
ABS(
) to be the largest absolute value of the elements of
. If ABS(
) is greater than c*number for any row of
in the contrast, then
is declared nonestimable. Here,
is the Hermite form matrix
, and c is ABS(
), except when it equals 0, and then c is 1. The value of number is between 0 and 1; the default is 1E–4.
-
SLICE=effect1 <,effect2, …>}
-
specifies effects by which to partition interaction LS-mean effects.
This option is available only for the LMIXED procedure. This partition can produce what are known as tests of simple effects (Winer 1971). For example, suppose that A*B is significant, and you want to test the effect of A for each level of B. The appropriate lsmeans statement is
lsmeans A*B / slice=B;
This statement 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 by using them to form an F test.
The slice= option produces F tests that test the simultaneous equality of cell means at a fixed level of the slice effect (Schabenberger, Gregoire, and Kong 2000). It produces a table titled "Tests of Effect Slices."