[R-meta] Covariance-variance matrix when studies share multiple treatment x control comparison
Viechtbauer, Wolfgang (SP)
wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Wed Sep 18 22:36:26 CEST 2019
Dear Ju,
There are two contrasts in study 1, 7.87 vs -1.36 and 4.35 vs -1.36, so the -1.36 comes from a common reference group. So, there will be two effect sizes for that study (and due to reuse of the reference group data, there is indeed dependence between the two effect sizes). Including the 7.87 vs 4.35 contrast is redundant. All the information about this contrast is already contained in the two contrasts above.
You haven't said what kind of effect size measure you are using for your analysis, but the code you posted comes from an example that uses the standardized mean difference as the measure (http://www.metafor-project.org/doku.php/analyses:gleser2009) -- and it only applies if this is the measure you are also using. You did not post any SDs (which would be needed if you are working with SMDs), maybe just for brevity, but I just wanted to mention this.
Best,
Wolfgang
-----Original Message-----
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On Behalf Of Ju Lee
Sent: Wednesday, 18 September, 2019 19:44
To: r-sig-meta-analysis using r-project.org
Subject: [R-meta] Covariance-variance matrix when studies share multiple treatment x control comparison
Dear Wolfgang and all,
I am running a multivariate mixed effect models using rma.mv and trying to build a variance-covariance matrix to account for inter-dependence rising from shared experimental units.
The issue I have is: what if my analysis includes studies where both controls and treatment groups are repeatedly used to calculate effect sizes (this was because each comparison produces different categorical comparison that are meaningful, but I am also trying to pool all studies to calculate the grand mean effect sizes ).
If I simplify my dataframe, it looks like below. here m1i, m2i are means for treatment and controls and n1i and n2i are sample sizes needed for constructing cov-var matrix.
study treatment m1i m2i n1i n2i
1 1 7.87 -1.36 25 25
1 2 4.35 -1.36 22 25
1 2 4.35 7.87 22 25
2 1 9.32 0.98 38 40
3 1 8.08 1.17 50 50
4 1 7.44 0.45 30 30
4 2 5.34 0.45 30 30
If you look at study 1, all three effect sizes share different subset of experimental group. Based on Wolfgang's code, I am trying to construct Cov-var matrix using following code:
calc.v <- function(x) {
v <- matrix(1/x$n2i[1] + outer(x$yi, x$yi, "*")/(2*x$Ni[1]), nrow=nrow(x), ncol=nrow(x))
diag(v) <- x$vi
v
}
V <- bldiag(lapply(split(dat, dat$study), calc.v))
V
But I am not sure how I can proceed here because all three effect sizes should be interdependent due to sharing some experimental groups, but how can we specify this in the matrix? Especially, between first and third response in the first study, mean of 7.87 is treatment in the first but control in the third response. How can we reasonably account for inter-dependence in such a case?
Thank you very much,
Best,
JU
More information about the R-sig-meta-analysis
mailing list