The LINES option in the LSMEANS statement can be used to represent comparisons among LS-means by connecting groups of insignificant means with lines. This makes comparisons between a large number of groups much easier to interpret. Beginning in SAS 9.4 TS1M5 (SAS/STAT® 14.3), the LINES option now displays this graphically. Previously, the results were displayed as a table using letters to group insignificant means. When ODS Graphics is on and you specify the LINES option, the LINES plot is produced instead of the LINES table with letter grouping. To obtain the LINES table with the letter grouping in addition to the graph, use the LINESTABLE option. When ODS Graphics is off, the LINES option produces only the LINES table.
The LSMEANS statement and the LINES and LINESTABLE options are available in many of the modeling procedures available in SAS/STAT. For a list of the supported procedures, see the description of the LSMEANS statement in the Shared Concepts and Topics chapter of the SAS/STAT Users Guide for your release of SAS®.
For example, the following statements produce the LINES plot instead of the LINES table.
ods graphics on; proc glm data=sashelp.class; class sex; model weight=height sex; lsmeans sex / diff lines; run; quit;
The line connecting the two means in the resulting plot shows that the means do not differ significantly.
The following statements produce the LINES table.
ods graphics off; proc glm data=sashelp.class; class sex; model weight=height sex; lsmeans sex / diff lines; run; quit;
Instead of the plot as above, the following LINES table is produced which uses lines made of letters to connect insignificant means. In the table, a line made of the the letter A connects the insignificant means.
|
These statements produce both the LINES table with letter grouping and the LINES plot.
ods graphics on; proc glm data=sashelp.class; class sex; model weight=height sex; lsmeans sex / diff linestable; run; quit;
If ODS Graphics is needed to produce other plots but only the LINES table with letter grouping is wanted, use either the PLOTS=NONE option in the LSMEANS statement or add an ODS EXCLUDE statement to suppress the LinesPlot graph. For example, the statements below show two ways to produce diagnostics plots and the LINES table, but suppress the LINES plot. Note that the first approach also suppresses all plots produced by the LSMEANS statement such as the plot of the means (MeanPlot) and the differences plot (DiffPlot) in addition to the LINES plot.
ods graphics on; proc glm data=sashelp.class plots=diagnostics; class sex; model weight=height sex; lsmeans sex / diff linestable plots=none; run; quit;
The second approach suppresses only the LINES plot.
ods graphics on; proc glm data=sashelp.class plots=diagnostics; class sex; model weight=height sex; lsmeans sex / diff linestable; ods exclude LinesPlot; run; quit;
Product Family | Product | System | Product Release | SAS Release | ||
Reported | Fixed* | Reported | Fixed* | |||
SAS System | SAS/STAT | z/OS | 14.3 | 9.4 TS1M5 | ||
z/OS 64-bit | 14.3 | 9.4 TS1M5 | ||||
Microsoft® Windows® for x64 | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows 8 Enterprise 32-bit | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows 8 Enterprise x64 | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows 8 Pro 32-bit | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows 8 Pro x64 | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows 8.1 Enterprise 32-bit | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows 8.1 Enterprise x64 | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows 8.1 Pro 32-bit | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows 8.1 Pro x64 | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows 10 | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2008 | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2008 R2 | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2008 for x64 | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2012 Datacenter | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2012 R2 Datacenter | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2012 R2 Std | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2012 Std | 14.3 | 9.4 TS1M5 | ||||
Microsoft Windows Server 2016 | 14.3 | 9.4 TS1M5 | ||||
Windows 7 Enterprise 32 bit | 14.3 | 9.4 TS1M5 | ||||
Windows 7 Enterprise x64 | 14.3 | 9.4 TS1M5 | ||||
Windows 7 Home Premium 32 bit | 14.3 | 9.4 TS1M5 | ||||
Windows 7 Home Premium x64 | 14.3 | 9.4 TS1M5 | ||||
Windows 7 Professional 32 bit | 14.3 | 9.4 TS1M5 | ||||
Windows 7 Professional x64 | 14.3 | 9.4 TS1M5 | ||||
Windows 7 Ultimate 32 bit | 14.3 | 9.4 TS1M5 | ||||
Windows 7 Ultimate x64 | 14.3 | 9.4 TS1M5 | ||||
64-bit Enabled AIX | 14.3 | 9.4 TS1M5 | ||||
64-bit Enabled Solaris | 14.3 | 9.4 TS1M5 | ||||
HP-UX IPF | 14.3 | 9.4 TS1M5 | ||||
Linux for x64 | 14.3 | 9.4 TS1M5 | ||||
Solaris for x64 | 14.3 | 9.4 TS1M5 |
ods graphics on;
proc glm data=sashelp.class;
class sex;
model weight=sex height;
lsmeans sex / diff lines;
run;
quit;
ods graphics off;
proc glm data=sashelp.class;
class sex;
model weight=height sex;
lsmeans sex / diff lines;
run;
quit;
proc glm data=sashelp.class;
class sex;
model weight=height sex;
lsmeans sex / diff linestable;
run;
quit;
T Grouping for LS-Means of Sex LS-means with the same letter are not significantly different. Weight LSMEAN Sex LSMEAN Number A 103.1625 M 2 A A 96.5417 F 1
Type: | Usage Note |
Priority: | |
Topic: | Analytics ==> Analysis of Means Analytics ==> Analysis of Variance Analytics ==> Categorical Data Analysis Analytics ==> Longitudinal Analysis Analytics ==> Mixed Models Analytics ==> Statistical Graphics Analytics ==> analytics SAS Reference ==> Procedures ==> GEE SAS Reference ==> Procedures ==> GENMOD SAS Reference ==> Procedures ==> GLM SAS Reference ==> Procedures ==> LIFEREG SAS Reference ==> Procedures ==> LOGISTIC SAS Reference ==> Procedures ==> ORTHOREG SAS Reference ==> Procedures ==> PHREG SAS Reference ==> Procedures ==> PLM SAS Reference ==> Procedures ==> PROBIT SAS Reference ==> Procedures ==> RELIABILITY SAS Reference ==> Procedures ==> SURVEYLOGISTIC SAS Reference ==> Procedures ==> SURVEYPHREG SAS Reference ==> Procedures ==> SURVEYREG |
Date Modified: | 2019-07-19 10:10:04 |
Date Created: | 2019-03-08 09:05:20 |