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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

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