[R-meta] DID effect size with ROMC in metafor

Zhouhan Jin zj|n65 @end|ng |rom uwo@c@
Mon Dec 16 04:50:33 CET 2024


Hi Wolfgang,

This is a double-check. To compute a difference-in-differences effect size using "ROMC" as the measure of within-group change, can I use the metafor code below?

If yes, what is the interpretation of a DID_ROMC value of say, +1.5 or -0.5?

Thank you in advance.

######### R code:
dat.romc <- read.table(header=T, text="
study time_interval   group      ni   mpre    mpost  sdpre  sdpost
1     pre-post1       treat      28   0.89     5.07   1.40   3.20
1     pre-post2       treat      28   0.89     3.64   1.40   3.15
1     pre-post1       contl      58   1.22     3.52   1.76   2.58
1     pre-post2       contl      58   1.22     2.86   1.76   2.80
2     pre-post1       treat      38   1.89     4.07   0.40   2.20
2     pre-post1       contl      48   2.22     2.52   0.76   1.58")

library(metafor)
datT <- escalc("ROMC", ni=ni, m1i=mpost, m2i=mpre, sd1i=sdpre, sd2i=sdpost, ri=rep(.5,3), data=subset(dat.romc,group=="treat"))

datC <- escalc("ROMC", ni=ni, m1i=mpost, m2i=mpre, sd1i=sdpre, sd2i=sdpost, ri=rep(.5,3), data=subset(dat.romc,group=="contl"))

dat <- data.frame(DID_ROMC = datT$yi - datC$yi, vi = datT$vi + datC$vi, time_interval=datT$time_interval)

Best wishes,

Zhouhan Jin

	[[alternative HTML version deleted]]



More information about the R-sig-meta-analysis mailing list