The BGLIMM Procedure

LSMEANS Statement

  • LSMEANS fixed-effects </ options>;

The LSMEANS statement computes least squares means (LS-means) of fixed effects. LS-means estimate the marginal means over a balanced population. A more appropriate approach to LS-means views them as linear combinations of the parameter estimates that are constructed in such a way that they correspond to average predicted values in a population where the levels of classification variables are balanced.

The bold upper L matrix that is constructed to compute them is the same as the bold upper L matrix that is constructed in other SAS procedures. LS-means computations are not supported for multinomial models.

LS-means are constructed on the linked scale—that is, the scale on which the model effects are additive. For example, in a binomial model with a logit link, the LS-means are predicted population margins of the logits.

LS-means can be computed for any effect in the MODEL statement that involves only CLASS variables. You can specify multiple effects in one LSMEANS statement or in multiple LSMEANS statements, and all LSMEANS statements must appear after the MODEL statement.

The fixed-effects parameters that are used in the LSMEANS statement come directly from the posterior samples. They are marginal posterior samples (with random effects integrated out), not marginal predictive samples.

For more information about the syntax of the LSMEANS statement, see the section LSMEANS Statement in Chapter 20, Shared Concepts and Topics.

You can specify the following options in the LSMEANS statement after a slash (/):

DIFF
PDIFF

displays differences of the LS-means in a table titled "Differences of Least Squares Means."

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.

EST
E

displays the bold upper L matrix coefficients (coefficients that are used to compute the LS-means).

ILINK

requests that estimates in the "Least Squares Means" table also be reported on the scale of the mean (the inverse linked scale). This option is specific to an LSMEANS statement.

The BGLIMM procedure applies the inverse link transform to the LS-mean that is reported in the Inverse Link Mean column. In a logistic model, for example, this implies that the value that is reported as the inversely linked estimate corresponds to a predicted probability that is based on an average estimable function (the function that produces the LS-mean on the linear scale).

Last updated: December 09, 2022