I would like to conduct a multivariate meta-analysis (or network meta-analysis) to investigate the effect of two factors (A & B, 1 & 2). For every combination of the two factors I have a number of studies that report results that describe the difference in effect size as well as the variance thereof (A1 vs B1, A1 vs B2, A2 vs B1, A2 vs B2). Every effect size comes from an separate study. I would like to investigate the main-effects as well as the interaction of my two factors. Here I provide a dummy example of the data in R that I create initially for trying out the gemtc package:
set.seed(100)
treat1 <- c(rep("A1", 10),rep("A1", 8),rep("A2", 15),rep("A2", 5))
treat2 <- c(rep("B1", 10),rep("B2", 8),rep("B1", 15),rep("B2", 5))
TE <- c(rnorm(10,5,1),rnorm(8,2,1),rnorm(15,3,1),rnorm(5,1,1))
seTE <- c(rnorm(10,1,1),rnorm(8,2,1),rnorm(15,0.5,1),rnorm(5,0.2,1))
studlab <- paste(rep("study_", 38), as.character(c(1:38)), sep="")
my_data <- data.frame(treat1, treat2, TE, seTE, studlab)
my_data
I would be thankful for a pointer to an appropriate R package (gemtc, netmeta, mvmeta ?) that could handle such data and how to model not only main effects but also interactions of my factors. Some hints how to get started would be fantastic…
Best Answer
Given that there is a single effect size estimate from each study (see comments above), the analysis can be carried out with regular meta-regression methods. You can carry out such an analysis with the metafor package. The "trick" is to code variables that indicate what treatments have been compared within a particular study:
yields:
Since variable
B2
has been left out, this becomes the "reference" treatment. So, the coefficient forA1
is the estimated average effect when comparing treatmentA1
againstB2
. The coefficient forA2
is the estimated average effect when comparing treatmentA2
againstB2
. And the coefficient forB1
is the estimated average effect when comparing treatmentB1
againstB2
.The network that is analyzed here looks like this:
So, the comparison between
B1
andB2
is based purely on indirect evidence.There are 3 more comparisons that can be obtained here besides the ones above (i.e.,
A1
vsA2
,A1
vsB1
, andA2
vsB1
). You can obtain those by changing the "reference" treatment.An assumption made here is that the amount of heterogeneity is the same regardless of the comparison. This may or may not be true.
An article that describes this type of analysis is:
Salanti et al. (2008). Evaluation of networks of randomized trials. Statistical Methods in Medical Research, 17, 279-301.
Edit: To test whether the effect of the first factor (A & B) depends on the second factor (1 & 2), that is, whether (A1 vs B1) = (A2 vs B2) or not, first note that:
So, you just have to test whether
b1 - b2 - b3 = 0
. You can do this with:or install/load the
multcomp
package and use:which yields: