LSMESTIMATE fixed-effect <'label'> values <divisor=n> <, <'label'> values <divisor=n>> <, …></ options>;
The LSMESTIMATE statement provides a mechanism for obtaining custom hypothesis tests among the least squares means. In contrast to the hypotheses tested with the ESTIMATE or CONTRAST statements, the LSMESTIMATE statement enables you to form linear combinations of the least squares means, rather than linear combination of fixed-effects parameter estimates and/or random-effects solutions. Multiple-row sets of coefficients are permitted.
The computation of an LSMESTIMATE involves two coefficient matrices. Suppose that the fixed-effect has levels. Then the LS-means are formed as , where is a coefficient matrix. The coefficient matrix is formed from the values that you supply in the k rows of the LSMESTIMATE statement. The least squares means estimates then represent the vector
The GLIMMIX procedure supports nonpositional syntax for the coefficients (values) in the LSMESTIMATE statement. For details see the section Positional and Nonpositional Syntax for Contrast Coefficients.
PROC GLIMMIX produces a t test for each row of coefficients specified in the LSMESTIMATE statement. You can adjust p-values and confidence intervals for multiplicity with the ADJUST= option. You can obtain an F test of single-row or multirow LSMESTIMATEs with the FTEST option.
Note that in contrast to a multirow estimate in the ESTIMATE
statement, you specify only a single fixed effect in the LSMESTIMATE statement. The row labels are optional and follow the
effects specification. For example, the following statements fit a split-split-plot design and compare the average of the
third and fourth LS-mean of the whole-plot factor A
to the first LS-mean of the factor:
proc glimmix; class a b block; model y = a b a*b / s; random int a / sub=block; lsmestimate A 'a1 vs avg(a3,a4)' 2 0 -1 -1 divisor=2; run;
The order in which coefficients are assigned to the least squares means corresponds to the order in which they are displayed in the "Least Squares Means" table. You can use the ELSM option to see how coefficients are matched to levels of the fixed-effect.
The optional divisor=n specification enables you to assign a separate divisor to each row of the LSMESTIMATE. You can also assign divisor values through the DIVISOR= option. See the documentation that follows for the interaction between the two ways of specifying divisors.
Many options of the LSMESTIMATE statement affect the computation of least squares means—for example, the AT= , BYLEVEL , and OM options. See the documentation for the LSMEANS statement for details.
Table 45.9 summarizes the options available in the LSMESTIMATE statement.
Table 45.9: LSMESTIMATE Statement Options
Option |
Description |
---|---|
Construction and Computation of LS-Means |
|
Modifies covariate values in computing LS-means |
|
Computes separate margins |
|
Specifies a list of values to divide the coefficients |
|
Specifies the weighting scheme for LS-means computation as determined by a data set |
|
Tunes estimability checking |
|
Degrees of Freedom and p-values |
|
Determines denominator degrees of freedom when p-values and confidence limits are adjusted for multiple comparisons |
|
Determines the method for multiple comparison adjustment of LS-means differences |
|
Determines the confidence level () |
|
Requests a chi-square test in addition to the F test |
|
Assigns a specific value to degrees of freedom for tests and confidence limits |
|
Produces an F test |
|
Performs one-sided, lower-tailed inference |
|
Adjusts multiple comparison p-values further in a step-down fashion |
|
Performs one-sided, upper-tailed inference |
|
Statistical Output |
|
Constructs confidence limits for means and mean differences |
|
Displays the correlation matrix of LS-means |
|
Displays the covariance matrix of LS-means |
|
Prints the matrix |
|
Prints the matrix |
|
Produces a joint F or chi-square test for the LS-means and LS-means differences |
|
Generalized Linear Modeling |
|
Exponentiates and displays LS-means estimates |
|
Computes and displays estimates and standard errors of LS-means (but not differences) on the inverse linked scale |
You can specify the following options in the LSMESTIMATE statement after a slash (/).