Learn R Programming

metaBMA (version 0.3.9)

meta_random: Bayesian Random-Effects Meta-Analysis

Description

Runs a Bayesian meta-analysis assuming that the effect size \(d\) varies across studies with standard deviation \(\tau\) (i.e., a random-effects analysis).

Usage

meta_random(y, SE, labels, d = "norm", d.par = c(0, 0.3),
  tau = "halfcauchy", tau.par = 0.5, sample = 10000,
  summarize = "integrate", ...)

Arguments

y

mean in each study

SE

standard error in each study

labels

optional: character values with study labels

d

type of prior for mean effect \(d\) (see prior)

d.par

prior parameters for \(d\)

tau

type of prior for standard deviation of study effects \(\tau\) in random-effects meta-analysis (i.e., the SD of d across studies; see prior)

tau.par

prior parameters for \(\tau\)

sample

number of samples in JAGS after burn-in and thinning (see run.jags). Samples are used to get posterior estimates for each study effect (which will show shrinkage). Only works for priors defined in prior.

summarize

whether and to compute parameter summaries (mean, median, SD, 95% quantile interval, HPD interval). If summarize = "integrate", numerical integration is used (which is precise but can require some seconds of computing time), summarize = "jags" summarizes the JAGS samples, and summarize = "none" suppresses parameter summaries.

...

arguments passed to run.jags (e.g., MCMC parameters such as sample, burnin, n.chains, thin or method="parallel")

Examples

Run this code
# NOT RUN {
data(towels)
### Bayesian Random-Effects Meta-Analysis
mr <- meta_random(towels$logOR, towels$SE, towels$study,
                  d = "norm", d.par = c(0,.3),
                  tau = "halfcauchy", tau.par = .5,
                  sample = 0, summarize = "none")
                  # (no summary: only for CRAN checks)
mr
plot_posterior(mr)
# }

Run the code above in your browser using DataLab