Skip to content
Prev 4465 / 5636 Next

[R-meta] Computing Effect Size for Difference in Differences with Different Populations

The difference comes down to how the mean changes are standardized. You will find that

G1 <- escalc(measure="SMCRH", m1i=postm_G1, m2i=prem_G1, sd1i=pldpre_sd, ni=n_G1, sd2i=postsd_G1, ri=c(rep(0.7,50)), data=G)
G2 <- escalc(measure="SMCRH", m1i=postm_G2, m2i=prem_G2, sd1i=pldpre_sd, ni=n_G2, sd2i=postsd_G2, ri=c(rep(0.7,50)), data=G)
dat <- data.frame(yi = G1$yi - G2$yi, vi = G1$vi + G2$vi)

plot(dat$yi, ES, pch=19)
abline(0,1)

gives nearly identical results, the only difference arising due to the bias correction that is not applied to ES. If you have the 'devel' version of metafor installed, you can switch that off with:

G1 <- escalc(measure="SMCRH", m1i=postm_G1, m2i=prem_G1, sd1i=pldpre_sd, ni=n_G1, sd2i=postsd_G1, ri=c(rep(0.7,50)), data=G, correct=FALSE)
G2 <- escalc(measure="SMCRH", m1i=postm_G2, m2i=prem_G2, sd1i=pldpre_sd, ni=n_G2, sd2i=postsd_G2, ri=c(rep(0.7,50)), data=G, correct=FALSE)
dat <- data.frame(yi = G1$yi - G2$yi, vi = G1$vi + G2$vi)

and then the results are identical.

So, in the first approach (using sd1i=presd_G1 and sd1i=presd_G2, respectively, for the two groups), the mean changes are standardized by the group-specific (pre-treatment) SDs. In the 'ES-approach', the mean changes are standardized by the square root of the average (pre-treatment) variances. That is why I wrote that the two approaches should lead to similar estimates if the pre-treatment SDs are similar across the two groups. But

G$presd_G1 / G$presd_G2

shows that this is not really the case, so the two approaches give different estimates.

In the first approach, you are quantifying the effect size as the difference in the amount of change relative to the variability at the pre-treatment assessment within each group individually. In the second approach, you are quantifying the effect size as the difference in the amount of change relative to the average variability at the pre-treatment assessment.

Neither is right or wrong I would say.

One practical issue: With the ES-approach, you would still have the challenge of deriving the appropriate equation for the sampling variance of ES.

Best,
Wolfgang