[R-meta] Moderation analysis in IPD meta-analysis
corent|n@go@||ng @end|ng |rom gm@||@com
Fri Aug 7 20:03:12 CEST 2020
Dear Metafor’s users,
This is the first time that I post on this mailing list.
Our team is currently planning an individual patient data meta-analysis of
We adopt an IPD approach because no prospective study has yet reported this
association while many should have the data to assess it (i.e., they have
access to the targeted variables but did not report the association).
Unfortunately, we anticipate that most of the included studies will not
have an ethics committee that gives the right to share their data with us.
To overcome this, we plan to ask the authors of the included studies to
perform the analyses on their own data and to share only the results of the
analyses with us. Our dependent variable is binary (DV: yes/no) and our
independent variable is an ordered variable (IV: a scale variable in 12
points [from 1 to 12]) treated as a continuous variable.
We ask authors to perform a logistic regression. Based on their results
(log odds ratio and associated variance), we adopt a classic two-stage
approach. I show the R code for a particular study to highlight our
#R code for study 1
yi1<- summary(study1)$coefficients[2,1] #extract the log odds ratio
vi1<- summary(study1)$coefficients[2,2]^2 #extract the squared standard
# then, we repeat the same process for each included study
# Once all the effect sizes and their variance are collected, we can store
them within a dataset and run a standard two stage meta-analysis
yi=c(yi1, yi2, yi3…),
vi=c(vi1, vi2, vi3…),
study=c(1, 2, 3…))
This is the code for our primary analysis. In an exploratory analysis, we
would like to perform a moderation analysis with a patient-level moderator.
We understand how to perform a moderation analysis for a study-level
moderator but we are not sure on how to implement it with a patient-level
moderator. The aim of this moderation analysis will be to obtain the
estimated average effects for each level of a moderator. I describe here
the approach we have envisaged:
# example of R code for study 1
#let VM denote a participant-level moderator with 3 categories (a,b,c)
EM1<-emmeans::emtrends(study1, ~VM, var=" IV")
yi1<- as.data.frame(EM1$emtrends)[,2] #extract log odds ratio for each
level of the VM for study 1 (contains 3 values)
V1<-vcov(EM1) # extract the variance/covariance matrix for study 1 (a 3x3
# then, we can build a dataset which will look like this...
yi=c(yi1, yi2, yi3…),
study=c(1,1,1, 2,2,2, 3,3,3…))
# ...and a variance-covariance matrix using the bldiag function
# Last, we plan to perform a multivariate model in which we leave out the
model intercept and in which we use an unstructured variance structure (if
the model converges).
model<-rma.mv(yi, V, mods = ~ VM-1, random=~VM|study, struct="UN", data=dat)
We were wondering if you could give us some feedback on the correctness of
our approach. We have read in several textbooks that two-stage
meta-analyses are not designed to assess patient-level moderator but, given
that asking for raw data would probably decrease the likelihood of getting
return from authors of primary studies, we would prefer staying at a
Thank you very much for your help and for this amazing mailing list!
Corentin J Gosling
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis