BookmarkSubscribeRSS Feed
jowolfe79
Calcite | Level 5

I have used the following to calculate Cohen's d with PROC TTEST and I am wondering if there is a way to do something similar with PROC GLM so that I can calculate Cohen's d from the LSMeans.

proc ttest DATA=surveydata plots=none;
class X;
var A B C
ods select ConfLimits;
ods output ConfLimits=CL;
run;

data CohenD;
set Cl(where=(method="Pooled") rename=(Mean=MeanDiff));
CohenD = MeanDiff / StdDev;
run;

proc print data=CohenD noobs;
var Variable Class Method MeanDiff StdDev CohenD; 
run;

Here is my CURRENT PROC GLM STATEMENT.  I want to be able to use the same data statement as above to calculate Cohen's d.

 

PROC GLM DATA=surveydata PLOTS=none;
	CLASS X;
	MODEL A B C = X;
	LSMEANS X /adjust=bon;
	
RUN;

Is there a way to do this?  Thank you for any help!!

 

1 REPLY 1
Rick_SAS
SAS Super FREQ

For the history and context of the OP's problem, see the previous thread: https://communities.sas.com/t5/Statistical-Procedures/Easy-way-to-calculate-Cohen-s-d/m-p/801157 

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
  • 1 reply
  • 889 views
  • 1 like
  • 2 in conversation