LSMESTIMATE fixedeffect <'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 fixedeffects parameter estimates and/or randomeffects solutions. Multiplerow sets of coefficients are permitted.
The computation of an LSMESTIMATE involves two coefficient matrices. Suppose that the fixedeffect has levels. Then the LSmeans 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 pvalues and confidence intervals for multiplicity with the ADJUST= option. You can obtain an F test of singlerow 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 splitsplitplot design and compare the average of the
third and fourth LSmean of the wholeplot factor A
to the first LSmean 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 fixedeffect.
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 44.9 summarizes the options available in the LSMESTIMATE statement.
Table 44.9: LSMESTIMATE Statement Options
Option 
Description 

Construction and Computation of LSMeans 

Modifies covariate values in computing LSmeans 

Computes separate margins 

Specifies a list of values to divide the coefficients 

Specifies the weighting scheme for LSmeans computation as determined by a data set 

Tunes estimability checking 

Degrees of Freedom and pvalues 

Determines denominator degrees of freedom when pvalues and confidence limits are adjusted for multiple comparisons 

Determines the method for multiple comparison adjustment of LSmeans differences 

Determines the confidence level () 

Requests a chisquare 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 onesided, lowertailed inference 

Adjusts multiple comparison pvalues further in a stepdown fashion 

Performs onesided, uppertailed inference 

Statistical Output 

Constructs confidence limits for means and mean differences 

Displays the correlation matrix of LSmeans 

Displays the covariance matrix of LSmeans 

Prints the matrix 

Prints the matrix 

Produces a joint F or chisquare test for the LSmeans and LSmeans differences 

Generalized Linear Modeling 

Exponentiates and displays LSmeans estimates 

Computes and displays estimates and standard errors of LSmeans (but not differences) on the inverse linked scale 
You can specify the following options in the LSMESTIMATE statement after a slash (/).