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 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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