Skip to content
Prev 2625 / 5636 Next

[R-meta] Construct the covariance-matrices of different effect sizes

Hi James,

That's great!

Here is a small example using dput() (I hope that is what you meant to). I
also added two of my moderators that if someone can provide the syntax for
the overall average effect (without moderators), and also with a moderator.

dat <- structure(list(es.id = structure(c(1L, 3L, 4L, 5L, 6L, 7L, 8L, 9L,
10L, 2L), .Label = c("1", "10", "2", "3", "4", "5", "6",
"7", "8", "9"), class = "factor"), study.id = structure(c(1L, 1L, 2L, 2L,
2L, 3L, 4L, 4L, 5L, 5L), .Label = c("1", "2", "3",
"4", "5"), class = "factor"), n = c(25, 25, 16, 16, 16, 38, 28, 28, 14,
14), r = c(-0.61, -0.58, -0.58, -0.6, -0.56, -0.55, -0.5,
-0.5, -0.48, -0.42), mean.age = c(23, 23, 18.7, 18.7, 18.7, 25, 22.5, 22.5,
20.1, 20.1), comp.level = structure(c(1L, 1L, 2L,
2L, 2L, 1L, 1L, 1L, 2L, 2L), .Label = c("E", "SE"), class = "factor"), var1
= c("submax-T1", "submax-T2", "submax-T1", "submax-T2",
   "submax-T3", "submax-T1", "submax-T1", "submax-T2", "submax-T1",
"submax-T2"), var2 = c("max-T1", "max-T2", "max-T1", "max-T2", "max-T3",
"max-T1", "max-T1", "max-T2", "max-T1", "max-T2"), yi =
structure(c(-0.708921359427408, -0.662462707371799, -0.662462707371799,
-0.693147180559945, -0.632833186665638,
-0.618381313574463, -0.549306144334055, -0.549306144334055,
-0.522984277591344, -0.447692023527421), ni = c(25, 25, 16, 16, 16, 38, 28,
28, 14, 14), measure = "ZCOR"), vi = c(0.0454545454545455,
0.0454545454545455, 0.0769230769230769, 0.0769230769230769,
0.0769230769230769, 0.0285714285714286, 0.04, 0.04, 0.0909090909090909,
0.0909090909090909)), row.names = c(NA, -10L), class = c("escalc",
"data.frame"), digits = c(est = 4, se = 4, test = 4, pval = 4, ci = 4, var
= 4, sevar = 4, fit = 4, het = 4), yi.names = "yi", vi.names = "vi")

tmp <- rcalc(r ~ var1 + var2 | study.id, ni=n, data = dat)
V <- tmp$V
dat <- tmp$dat
dat[dat$study.id == 1,]

I've tried to follow the description here
https://wviechtb.github.io/metafor/reference/rcalc.html but got an error.

Happy to hear that for mean difference and SDs I'm on the right path! I
hope to be at the same position with my Pearson correlation and ICC data :)

Thanks James!

Kind regards,

Tzlil Shushan | Sport Scientist, Physical Preparation Coach

BEd Physical Education and Exercise Science
MSc Exercise Science - High Performance Sports: Strength &
Conditioning, CSCS
PhD Candidate Human Performance Science & Sports Analytics



??????? ??? ??, 21 ????? 2021 ?-3:02 ??? ?James Pustejovsky?? <?
jepusto at gmail.com??>:?