5

Based on this paper by Lakens 2013, I understand there are two recommended ways for calculating Cohen's $d$ for within subjects measures. 

  1. Cohen's $d_{rm}$ (which assumes the correlation between measures is known) and can be calculated as: $$ \text{Cohen's }d_{rm}=( M_{diff}/\sqrt{(SD_1^2+SD_2^2-2*r*SD_1*SD_2})*\sqrt{2(1-r)} $$ Where $M_{diff}$ is the difference in means, $SD_1$ and $SD_2$ are the standard deviations of these means and $r$ is the correlation between measures.

    the variance of Cohen's $d_{rm}$ can be calculated using the following: $$ V(d_{rm})=(1/n+d_{rm}^2/2n)2(1-r) $$ where $n$ is the sample size. Again this assumes the correlation is known. 

  2. Cohen's $d_{av}$ (which ignores any correlation between measures and used the average of the standard deviations). $$ \text{Cohen's }d_{av}=M_{diff}/((SD_1+SD_2)/2) $$ My question is how to calculate the variance of Cohen's $d_{av}$ $(V(d_{av}))$? 

Can it be calculate in a similar manner to the calculation for  independent groups - simply by substituting $d$ for $d_{av}$? $$ V(d_{av}) = (n_1+n_2/n_1*n_2)+(d_{av}^2/2(n_1+n_2)) $$ if so some elements of this equation appear unclear as the sample size is the same for both observations.

Calculating variance of Cohen's d for repeated measures designs? - ResearchGate (accessed Jan 13, 2017).

  • I have made some more edits subsequent to Gung's major formatting effort. Can you check the equations carefully as I am still not sure they are all correct. – mdewey Jan 13 '17 at 14:08
  • Thank-you for editing these equations ! This is my first post on here so I am still unsure how to properly format !! These equations look to be correct now - thank-you! – RebeccaHirst Jan 13 '17 at 16:00
  • Yes, once you ignore the correlations, you can just plug-in the estimator of Cohen's $\delta$. BTW, see [here](http://stats.stackexchange.com/questions/144084/variance-of-cohens-d-statistic?rq=1) slightly different formula for its variance. – V. Vancak Jan 13 '17 at 16:36
  • @V.V thanks for your response! Does it not matter that n1 and n2 are the same sample (as this is within subjects)? – RebeccaHirst Jan 13 '17 at 16:49
  • It makes the formula slightly more elegant, nothing more. It is equivalent to a so-called "balanced design" Cohen's $\delta$. Anyway, it seems like the main issue should be the omitting of the autocorrelation that you have to be concerned about. – V. Vancak Jan 13 '17 at 17:50
  • Actually, that is not true. The derivation given [here](http://stats.stackexchange.com/a/185377/1934) is for two independent samples, but the question here is about a within-subjects design. – Wolfgang Jan 14 '17 at 10:58
  • @Wolfgang your `metafor` package implements the change score standardization (`SMCC`) and references it by `Gibbons et al., 1993`. I had a look in this paper but I couldn't find whether Gibbons, and thus your SMCC implementation, applies the correction factor `sqrt(2 (1-r))` or not - would be grateful if you could clarify! – Agile Bean Aug 30 '21 at 03:32
  • `SMCC` is for the standardized mean difference using change score standardization, so $d = M_{diff} / SD_{diff}$. `SMCR` is for raw score standardization, so $d = M_{diff} / SD_1$. – Wolfgang Aug 30 '21 at 08:35
  • @Wolfgang thanks a lot. sorry to ask again, but does `metafor::escalc(measure="SMCC")` calculate by `sqrt (SD21+22−2××12)` as you specified in your answer below? If yes, why without the correction `sqrt(2 (1-r))`? Is that negligible? – Agile Bean Sep 02 '21 at 13:21
  • Yes to your first question. Because this is change score standardization to your second question. – Wolfgang Sep 02 '21 at 20:21
  • @Wolfgang thanks a lot for the clarification! Now I can describe your function correctly. Lastly, I'm curious about your opinion - do you think one can neglect this correction factor √2(1−) which the Lakens 2013 paper cites by reference of Cohen (1988)?? – Agile Bean Sep 07 '21 at 08:09

2 Answers2

9

There is no know derivation of the variance of $d_{av}$. In fact, this is not how one should compute the $d$ value for a within-subjects design (neither with $d_{rm}$ or the $d_{av}$).

There are two approaches for computing a $d$ value for a within-subjects design. The first uses change score standardization and is given by $$d_c = \frac{M_d}{SD_d},$$ where $M_d$ is the mean change and $SD_d$ is the SD of the change scores (which is equal to $SD_d = \sqrt{SD_1^2 + SD_2^2 - 2 \times r \times SD_1SD_2}$). The large-sample variance of $d_c$ is $$Var[d_c] = \frac{1}{n} + \frac{d_c^2}{2 \times n}.$$

The second approach uses raw score standardization. Here, we standardize based on the SD of either the pre- or the post-test scores (typically, the SD of the pre-test scores is used). So, we compute $$d_r = \frac{M_d}{SD_1}.$$ The large-sample variance of $d_r$ is $$Var[d_r] = \frac{2(1-r)}{n} + \frac{d_r^2}{2 \times n}.$$

We do not take the average of $SD_1$ and $SD_2$ in the second approach (and if anything, we would compute $\sqrt{(SD_1^2 + SD_2^2)/2}$ but again we also do not do that). If you would do this, then it becomes nearly impossible to derive the variance, because $SD_1^2 + SD_2^2$ does not follow a (scaled) $\chi^2$ distribution, since the pre- and post-test scores are not independent. If you look at the answer given here (which is about the independent samples case), you will see that the derivation of the variance involves the non-central t-distribution, which is also involved in deriving the two variance equations above. However, to get that non-central t, you need (the square-root of) a (scaled) $\chi^2$ distribution in the denominator.

Wolfgang
  • 15,542
  • 1
  • 47
  • 74
  • 1
    My reason for choosing dav is that it does not require knowledge of r. The problem with drm, dc and dr, is that knowledge of r is required. I am conducting a meta-analysis in which r is not typically reported for each study. I can either try to estimate r based on the scores available in the literature, or use dav - which does not require r. My aim was to compute both and perform a sensitivity analysis to observe the differences, however I cannot do this without knowing how to calculate variance for dav- are you suggesting that this is not possible? Thanks for your help – RebeccaHirst Jan 14 '17 at 12:15
  • Again, I do not know of any derivation of the variance of $d_{av}$, and I don't think there is. But it would involve $r$, just like the variance for $d_r$. So, there is no way around knowing or 'guestimating' the correlation here, regardless of what kind of d value you compute. – Wolfgang Jan 14 '17 at 12:49
  • [There are at least 5 different ways in actual practice that people compute a d statistic for a within-subjects design](http://jakewestfall.org/blog/index.php/2016/03/25/five-different-cohens-d-statistics-for-within-subject-designs/). Curious for any comments you have on that (which you could leave here or at my blog, whichever is more appropriate). – Jake Westfall Jan 28 '17 at 03:55
  • @JakeWestfall This was too long for a comment here, so I commented at your blog. – Wolfgang Jan 28 '17 at 12:17
  • Dear Wolfang, $(1)$ could you please provide a reference for the large-sample variance of $d_c$? $(2)$ is the variance of bias-corrected $d_c$ (Hedge's *g*) the following: $Var(d_c) \times (Hedge's~ correction factor)^2$ – rnorouzian Apr 25 '19 at 15:43
  • (1) Gibbons, R. D., Hedeker, D. R., & Davis, J. M. (1993). Estimation of effect size from a series of experiments involving paired comparisons. Journal of Educational Statistics, 18(3), 271-279. (2) Yes and no. In principle, yes, but the equation for $\mbox{Var}(d_c)$ is a large-sample approximation to begin with. So, it is debatable whether one should apply the same correction factor to the variance. In fact, based on https://journals.sagepub.com/doi/10.3102/1076998606298034 the answer might be that one should not. – Wolfgang Apr 27 '19 at 12:44
  • Yes, that equation is the bias correction factor. It applies to various effect size measures. For a SMD of two independent samples, $df = n_1 + n_2 - 2$. For the two-dependent samples case, $df = n - 1$. – Wolfgang May 02 '19 at 07:40
  • May I possibly invite you to take a look at [**this similar question**](https://stats.stackexchange.com/questions/406632/standard-error-for-difference-between-two-independent-gains) in this regard? – rnorouzian May 05 '19 at 03:24
  • 1
    @Wolfgang (March 2021): New research should be acknowledged: The distribution of the Cohen's d in repeated measures when we take as denominator $\sqrt{SD_1^2+SD_2^2)/2}$ is now known (doi: 10.20982/tqmp.16.4.p418). It does require knowledge of the correlation. – Denis Cousineau Mar 25 '21 at 12:44
  • Awesome! Will take a look when I get the chance. – Wolfgang Mar 25 '21 at 13:41
  • Thank you for the wonderful answer @Wolfgang! Just a quick question: how to extend those two approaches to three time points? – cliu May 18 '21 at 02:01
4

Structural equation modeling (SEM) is your friend in this case. We need the sample means and the covariance matrix as inputs. We may label the parameters (m1, m2, sd1, and sd2) and define $d_{av}$=(m2-m1)/((sd1+sd2)/2). SEM automatically calculates $Var(d_{av})$ by taken the correlation between the pre- and post-test scores into account.

The followings are the R code using the lavaan package. You may refer to Chapter 3 in Cheung (2015) for the details.

library("lavaan")

## Sample covariance matrix on pre- and post-test scores
lower <- '10
          8 12'
( Cov <- getCov(lower, diag=TRUE, names=c("x_pre","x_post")) )

## Means of the pre- and post-tests
Mean <- c(10, 13)

## Sample size
N <- 50

model1 <- '# Label the sds with sd1 and sd2
           eta_pre =~ sd1*x_pre
           eta_post =~ sd2*x_post
           # Fix the error variances at 0
           x_pre ~~ 0*x_pre
           x_post ~~ 0*x_post
           # Label the means with m1 and m2 
           x_pre ~ m1*1
           x_post ~ m2*1
           # Define d_av
           d_av := (m2-m1)/((sd1+sd2)/2)'

## Fit the model
fit1 <- cfa(model1, sample.cov=Cov, sample.mean=Mean, 
            sample.nobs=N, std.lv=TRUE, 
            sample.cov.rescale=FALSE)

## Display d_av and its SE
parameterEstimates(fit1)[12, -c(1,2,3)]

## Output
   label   est    se   z pvalue ci.lower ci.upper
12  d_av 0.905 0.131 6.9      0    0.648    1.163

Reference

Cheung, M. W.-L. (2015). Meta-analysis: A structural equation modeling approach. Chichester, West Sussex: John Wiley & Sons, Inc.

Mike Cheung
  • 576
  • 2
  • 6