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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1060 views
  • 1 like
  • 4 in conversation