[R-meta] Meta-analysis controlling for a moderator
Caroline Hoyniak
choyni@k @ending from gm@il@com
Mon Jul 9 17:24:12 CEST 2018
I’d like to test whether the overall effect size is significantly different
from zero when controlling for a moderator. For a minimal working example,
I am using the dataset provided with the metafor package, which contains 13
effect size estimates and corresponding sampling variances of the effect of
BCG vaccination on the prevention of tuberculosis. Here are the steps I
take:
R>#Load package and dataset
R> library("metafor")
R> data("dat.bcg", package = "metafor")
1) Once these 13 effect sizes were converted to the same metric,
R> #Calculate effect sizes on common metric
R> dat <- escalc(measure = "RR", ai = tpos, bi = tneg, ci = cpos, di =
cneg, data = dat.bcg, append = TRUE)
2) I fitted a fixed-effects model examining the magnitude of the effect of
vaccination on prevention of tuberculosis (with yi = observed outcomes and
vi = sampling variance), and finding a significant average effect size
estimate with a substantial amount of heterogeneity:
R> # Fit fixed-effect model
R> res <- rma(yi, vi, data = dat, method="FE")
3) I then moved on to a moderator analysis. Using the following code, I
examined if a continuous variable (ablat, representing the absolute
latitude of the study location) significantly moderated the average effect
size estimate of the effect of vaccination on the prevention of
tuberculosis.
R> # Examine continuous moderator (ablat)
R> res <- rma(yi, vi, mods = ~ ablat, data = dat, method = "REML")
I am further interested if the average effect size estimate remains
significant (i.e., whether the effect size is different from zero) when
controlling for this continuous moderator (ablat). In other words, I’m
interested in whether there remains an effect of vaccination on the
prevention of tuberculosis when controlling for the covariate (i.e.,
examining whether vaccination is still effective when controlling for study
location). Is this possible? Any help would be appreciated.
Best,
Caroline Hoyniak
Doctoral Candidate, Clinical Science
Bates Social Development Lab
Indiana University - Bloomington
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis
mailing list