Troubleshooting
Problem
I need to compute a "post-hoc" estimate of effect size in the form of Cohen's d, the mean difference divided by the pooled standard deviation. Can SPSS produce this?
Resolving The Problem
SPSS currently can produce partial eta^2 values in several procedures that have ANOVA capabilities, but none produce d. Following are commands for producing an estimate of d in SPSS based on a given sample. The same cautions about positively biased estimates of effect sizes resulting from "post-hoc" computations that apply to results from SPSS procedures that provide partial eta^2 values should be applied here as well.
*Compute's Cohen's d for two independent samples, using observed means and standard deviations.
*Replace groupvar and depvar with appropriate variable names in AGGREGATE command.
*If path c:\temp\temp.sav will not work, replace it in AGGREGATE and the three GET statements
*inside MATRIX.
AGGREGATE
/OUTFILE='c:\temp\temp.sav'
/BREAK=groupvar
/mean=MEAN(depvar)
/sd=SD(depvar)
/n=N(depvar).
MATRIX.
GET means /file='c:\temp\temp.sav' /var=mean.
GET sds /file='c:\temp\temp.sav' /var=sd.
GET ns /file='c:\temp\temp.sav' /var=n.
COMPUTE d=(mmax(means)-mmin(means))/sqrt(((ns(1)-1)*sds(1)**2+(ns(2)-1)*sds(2)**2)/(ns(1)+ns(2)-2)).
PRINT d.
END MATRIX.
Related Information
Historical Number
77292
Was this topic helpful?
Document Information
Modified date:
16 April 2020
UID
swg21480222