metaBMA (version 0.6.1)

meta_ordered: Meta-Analysis with Order-Constrained Study Effects

Description

Computes the Bayes factor for the hypothesis that the true study effects in a random-effects meta-anaysis are all positive or negative.

Usage

meta_ordered(y, SE, labels, data, d = prior("norm", c(mean = 0, sd =
  0.3), lower = 0), tau = prior("invgamma", c(shape = 1, scale = 0.15)),
  prior = c(1, 1, 1, 1), logml = "integrate", summarize = "stan",
  ci = 0.95, rel.tol = .Machine$double.eps^0.3, silent_stan = TRUE,
  ...)

Arguments

y

effect size per study. Can be provided as (1) a numeric vector, (2) the quoted or unquoted name of the variable in data, or (3) a formula to include discrete or continuous moderator variables.

SE

standard error of effect size for each study. Can be a numeric vector or the quoted or unquoted name of the variable in data

labels

optional: character values with study labels. Can be a character vector or the quoted or unquoted name of the variable in data

data

data frame containing the variables for effect size y, standard error SE, labels, and moderators per study.

d

prior distribution on the average effect size \(d\). The prior probability density function is defined via prior.

tau

prior distribution on the between-study heterogeneity \(\tau\) (i.e., the standard deviation of the study effect sizes dstudy in a random-effects meta-analysis. A (nonnegative) prior probability density function is defined via prior.

prior

prior probabilities over models (possibly unnormalized) in the order c(fixed_H0, fixed_H1, ordered_H1, random_H1). Note that the model random_H0 is not included in the comparison.

logml

how to estimate the log-marginal likelihood: either by numerical integration ("integrate") or by bridge sampling using MCMC/Stan samples ("stan"). To obtain high precision with logml="stan", many MCMC samples are required (e.g., iter=10000, warmup=1000).

summarize

how to estimate parameter summaries (mean, median, SD, etc.): Either by numerical integration (summarize = "integrate") or based on MCMC/Stan samples (summarize = "stan").

ci

probability for the credibility/highest-density intervals.

rel.tol

relative tolerance used for numerical integration using integrate. Use rel.tol=.Machine$double.eps for maximal precision (however, this might be slow).

silent_stan

whether to suppress the Stan progress bar.

...

further arguments passed to rstan::sampling (see stanmodel-method-sampling). For instance: warmup=500, chains=4, control=list(adapt_delta=.95)).

Details

Usually, in random-effects meta-analysis,the study-specific random-effects are allowed to be both negative or positive even when the prior on the overall effect size d is truncated to be positive). In contrast, the function meta_ordered tests a model in which the random effects are forced to be either all positive or all negative. The direction of the study-specific random-effects is defined via the prior on d. For instance, d=prior("norm", c(0,.5), lower=0) means that all random-effects are positive (not just the overall mean effect size).

The Bayes factor for the order-constrained model is computed using the encompassing Bayes factor. Since many posterior samples are required for this approach, the default number of MCMC iterations for meta_ordered is iter=10000 per chain. The posterior summary statistics for the model ordered refer to the overall effect size (i.e., the expected value of the truncated normal distribution) and not to the location parameter d (which is not the expected value of a truncated normal).

References

Haaf, J. M., & Rouder, J. N. (in press). Some do and some don<U+2019>t? Accounting for variability of individual difference structures. Psychonomic Bulletin & Review. doi: 10.3758/s13423-018-1522-x

See Also

meta_bma, meta_random

Examples

Run this code
# NOT RUN {
### Bayesian Meta-Analysis with Order Constraints
# Note: The following code optimizes speed (for CRAN checks).
#       The settings are not suitable for actual data analysis!

data(towels)
set.seed(123)
mo <- meta_ordered(logOR, SE, study, towels,
                   d = prior("norm", c(mean=0, sd=.3), lower=0),
                   rel.tol=.Machine$double.eps^.15, iter=2000)
mo
plot_posterior(mo)
# }

Run the code above in your browser using DataCamp Workspace