Shared Concepts and Topics

ODS Graphics: LSMEANS Statement

This section describes the use of ODS Graphics for creating graphics that are related to LS-means in procedures that support the common LSMEANS statement. There are two groups of available plots: those that can be produced by all procedures that support this statement, and those that can be produced only in association with the three procedures that can perform Bayesian analysis (PROC GENMOD, PROC LIFEREG, and PROC PHREG). Plots that are associated with the Bayesian analysis are available via these procedures directly, and also by using PROC PLM with an item store that was created by these procedures.

Plots in the first group depict the LS-means and their differences; when LS-mean comparisons are adjusted for multiplicity by using the ADJUST= option, the plots are adjusted accordingly. To request plots in this group, ODS Graphics must be enabled and you must request plots with the appropriate PLOTS= option in the LSMEANS statement. Plots in the second group depict the posterior sample distribution of LS-means and their differences. To request plots in this group, you must also use a BAYES statement with PROC GENMOD, PROC PHREG, or PROC LIFEREG, or you must use PROC PLM to perform statistical analysis on an item store that was saved from a Bayesian analysis.

For more information about ODS Graphics, see ChapterĀ 24, Statistical Graphics Using ODS. The available graphs are summarized in Table 26 and Table 27.

Table 26: Graphs Produced by All Procedures That Support the Common LSMEANS Statement

ODS Graph Name Plot Description Required Option
AnomPlot Requests an analysis of means display in which least squares means are compared to an average least squares mean PLOTS=ANOM
ControlPlot Requests a display in which least squares means are compared to a reference level PLOTS=CONTROL
DiffPlot Displays all pairwise least squares mean differences and their significance. This plot is also known as a "mean-mean scatter plot" when based on arithmetic means. PLOTS=DIFF
LinesPlot Displays comparisons between least squares means, with lines that indicate nonsignificant subsets PLOTS=LINESPLOT
MeanPlot Displays least squares means PLOTS=MEANPLOT


Table 27: Graphs Produced by Procedures That Support the LSMEANS Statement and Bayesian Analysis

ODS Graph Name Plot Description Required Option
BoxPlot Displays box plots of LS-means or LS-mean differences across a posterior sample PLOTS=BOXPLOT
DistPanel Displays panels of histograms with kernel density curves overlaid. Each plot contains the results for the posterior sample of each LS-mean or LS-mean difference PLOTS=DISTPLOT
DistPlot Displays a histogram with a kernel density curve overlaid. The plot contains the results for the posterior sample of the LS-mean or LS-mean difference. PLOTS=DISTPLOT(UNPACK)
LinesPlot Displays a plot of LS-mean comparison lines LINES


For details about the plot-options of the LSMEANS statement, see the PLOTS= option in the section LSMEANS Statement. For more details about the DIFFPLOT in particular, see the section Graphics for LS-Mean Comparisons in ChapterĀ 52, The GLIMMIX Procedure.

Last updated: December 09, 2022