Compute Effect Sizes

Post date: Feb 27, 2012 8:21:44 PM

Recently I came across Marco del Giudice's paper on using Mahalanobis distance as a multivariate effect size, and comparing it to univariate effect sizes like Cohen's d. This prompted me to write up something similar for Matlab that will take multivariate data from 2 groups and compute both Cohen's d for univariate effects and Mahalanobis D for the multivariate effect size. In addition to this, the attached script has the option of implementing optimal shrinkage towards the diagonal sample covariance (e.g., Ledoit and Wolf) necessary for computing Mahalanobis D and will use bootstrapping for hypothesis testing on both univariate and multivariate effect sizes. For this to work in Matlab, you'll need the Statistics Toolbox as there is heavy reliance on various functions (e.g., nanmean, nancov).