BookmarkSubscribeRSS Feed
Abishekaa
Obsidian | Level 7

Hi,

   I  have a dataset for which I was able to calculate the LS means by group. I would like to create a boxplot for LS estimates by group. I tried creating a boxplot for the predicted values, but it doesn't show the same results (mean) as the LS mean values generated in SAS.

 

Could someone please explain which ODS output table will have all the 'LS' values, from which the LS means are calculated?

 

Thanks so much!

3 REPLIES 3
STAT_Kathleen
SAS Employee

You can look at the Details Section of each SAS/STAT procedure for the names of the respective ODS Table Names. The ODS OUTPUT LSMEANS= <data set> ; will create an output data set that includes the LSMEANS.

SteveDenham
Jade | Level 19

The least squares mean is a point estimate of the population mean for that group.  There are no individually calculated values - instead, there is a single solution to matrix equations.  The equivalent of a box plot would be a plot of the LS-mean with confidence bounds.

 

If you get very creative, you can overlay the LS-mean estimates on to a box plot of the variables using PROC SGPLOT.  You might get an answer for how to do that in the Graphics Programming community.

 

SteveDenham

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 850 views
  • 1 like
  • 4 in conversation