Why does meanEffectSize() use sqrt((varX + varY)/2) for the paired cohensD calculation?

6 次查看(过去 30 天)
I have typically seen Cohen's d for a paired data set calculated using the std(x-y), which is also the same as the std reported by running ttest(x,y). However, the meanEffectSize function appears to use stddev = sqrt((varX + varY)/2). The meanEffectSize function is giving me a different effect size than if I calculate it in the way I've typically seen. Does this alternate calculate relate to the use of hedgesCorrection or is it separate from this?

采纳的回答

Ive J
Ive J 2023-6-11
编辑:Ive J 2023-6-11
I assume you mean (check more flavors in this paper):
x = [10 12 15 8 11];
y = [14 18 16 12 13];
d = mean(x-y)/std(x-y)
d = -1.7442
eff = meanEffectSize(x, y, "Paired", true, "Effect", "cohen")
eff = 1×2 table
Effect ConfidenceIntervals _______ ___________________ CohensD -1.0851 -2.906 -0.18213
And yes, you are correct, the difference is because of hedgesCorrection. Also apparently, the function considers within subject correlation. Let's check it in R with effsize::cohen.d
%# in R
% x = c(10 ,12, 15, 8, 11);
% y = c(14 ,18 ,16,12,13);
% effsize::cohen.d(x, y, paired = T, within = F, hedges.correction = F)
Cohen's d
d estimate: -1.744163 (large)
95 percent confidence interval:
lower upper
-3.3816056 -0.1067208
% effsize::cohen.d(x, y, paired = T, within = T, hedges.correction = T)
Hedges's g
g estimate: -1.084754 (large)
95 percent confidence interval:
lower upper
-1.8930902 -0.2764184

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

产品


版本

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by