Exercise 7: Bayesian meta-analysis
In 2014, Crins et al. 1 published a meta-analysis assessing the incidence of acute rejection (AR) with or without Interleukin-2 receptor antagonists. In this exercise we will recreate this analysis.
Load the package
bayesmeta
2 and the data from Crins et al. (2014) with theR
commanddata("CrinsEtAl2014")
.library(bayesmeta) data(CrinsEtAl2014)
Play around with the companion shiny app at: https://rshiny.gwdg.de/apps/bayesmeta/.
If the website is unavailable, you can launch the app locally by running the 2 following commands from :library("shiny") install.packages("rhandsontable") runUrl("http://www.gwdg.de/~croever/bayesmeta/bayesmeta-app.zip")
Directly in the console now, using the
escalc()
function from the packagemetafor
, compute the estimated log odds ratios from the 6 considered studies alongside their sampling variances (ProTip: read the Measures for Dichotomous Variables section from the help of theescalc()
function). Check that those are the same as the one on the online shiny app (ProTip: ‘sigma’ is the standard error, i.e. the square root of the sampling variancevi
)library("metafor") crins.es <- escalc(measure = "OR", ai = exp.AR.events, n1i = exp.total, ci = cont.AR.events, n2i = cont.total, slab = publication, data = CrinsEtAl2014) crins.es[, c("publication", "yi", "vi")]
publication yi vi Heffron (2003) -2.3097026 0.3593718 Gibelli (2004) -0.4595323 0.3095760 Schuller (2005) -2.3025851 0.7750000 Ganschow (2005) -1.7578579 0.2078161 Spada (2006) -1.2584610 0.4121591 Gras (2008) -2.4178959 2.3372623 NB: Log-odds ratios are symmetric around zero and have a sampling distribution closer to the normal distibution than the natural OR scale. For this reason, they are usually prefered for meta-analyses. Their sample variance is then computed as the sum of the inverse of all the counts in the \(2 \times 2\) associated contingency table3.
Perform a random-effect meta-analysis of those data using the
bayesmeta()
function from the packagebayesmeta
, within . Use a uniform prior on \([0,4]\) for \(\tau\) and a Gaussian prior for \(\mu\) centered around \(0\) and with a standard deviation of \(4\).Write the corresponding random-effects Bayesian meta-analysis model (using math, not – yet).
Use
rjags
to estimate the same model, saving the BUGS model in a.txt
file (calledcrinsBUGSmodel.txt
for instance).
Nicola D Crins et al. “Interleukin-2 Receptor Antagonists for Pediatric Liver Transplant Recipients: A Systematic Review and Meta-Analysis of Controlled Studies,” Pediatric Transplantation 18, no. 8 (2014): 839–850, doi:10.1111/petr.12362.↩︎
Christian Röver “Bayesian Random-Effects Meta-Analysis Using the Bayesmeta R Package,” Journal of Statistical Software 93 (2020): 1–51, doi:10.18637/jss.v093.i06.↩︎
Joseph L. Fleiss and Jesse A. Berlin “Effect Sizes for Dichotomous Data,” in The Handbook of Research Synthesis and Meta-Analysis, 2nd Ed (New York, NY, US: Russell Sage Foundation, 2009), 237–253.↩︎