[R-meta] Individual participant data (IPD) meta-analysis

Viechtbauer Wolfgang (SP) wolfgang.viechtbauer at maastrichtuniversity.nl
Wed Jul 19 10:58:25 CEST 2017

One-stage IPD models are mixed-effects (multilevel) models. In principle, you can fit mixed-effects models based on primary data also with the rma.mv() function, although it was never intended for this. Heck, you can even do simple regression with rma() and rma.mv() if you are inclined to do so:

n <- 500
x1i <- rnorm(n)
x2i <- rnorm(n)
yi <- 2 + 0.5*x1i - 0.3*x2i + rnorm(n, 0, 4)
summary(lm(yi ~ x1i + x2i))
rma(yi, vi=0, mods = ~ x1i + x2i, test="knha")

Note that all sampling variances are forced to 0 here and the variance of the random effects for 'heterogeneity' is really then just the error variance as in regular regression. The results are identical. And when using the Knapp & Hartung method, then even all tests are identical.

With rma.mv(), that would be:

id <- 1:n
rma.mv(yi, V=0, mods = ~ x1i + x2i, random = ~ 1 | id, sparse=TRUE)

Here, you cannot use test="knha", so the tests are Wald-type chi^2 tests. With large n, this makes no practical difference though. Adding sparse=TRUE speeds up model fitting here a lot.

For data from multiple studies, one could use rma.mv(), adding fixed/random effects for studies (and possibly additional fixed/random effects if you have some kind of within-study treatment effect variable you are interested in).

But in the end, this is a bit silly, since lme() (from nlme) and lmer (from lme4) are really designed to analyze primary data.


Wolfgang Viechtbauer, Ph.D., Statistician | Department of Psychiatry and    
Neuropsychology | Maastricht University | P.O. Box 616 (VIJV1) | 6200 MD    
Maastricht, The Netherlands | +31 (43) 388-4170 | http://www.wvbauer.com    

-----Original Message-----
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-project.org] On Behalf Of Martineau, Roger
Sent: Tuesday, July 18, 2017 20:53
To: r-sig-meta-analysis at r-project.org
Subject: [R-meta] Individual participant data (IPD) meta-analysis

Dear metafor users,

I read that paper recently: Stewart et al. (2012) Statistical analysis of individual participant data meta-analyses: a comparison of methods and recommendations for practice. PLOSOne e46042. IPD meta-analysis models can be fitted with one- and two-stage models. In the M&M of that paper, the authors report that they used the lme4 package for the one-stage model and the metafor package for the two-stage model (see page 3). I couldn’t contact the authors to get more information.

I have the raw data from several studies from our laboratory and would like to fit a one-stage IPD meta-analysis model. Can it be done with metafor using the rma.mv function and how to do it ?

Thanks in advance,

Roger ☺

Roger Martineau, mv Ph.D.
Centre de recherche et de développement
sur le bovin laitier et le porc
Agriculture et agroalimentaire Canada/Agriculture and Agri-Food Canada
Téléphone/Telephone: 819-780-7319
Télécopieur/Facsimile: 819-564-5507
2000, Rue Collège / 2000, College Street
Sherbrooke (Québec)  J1M 0C8
roger.martineau at agr.gc.ca<mailto:roger.martineau at agr.gc.ca>

More information about the R-sig-meta-analysis mailing list