meta_ordered | R Documentation |
Computes the Bayes factor for the hypothesis that the true study effects in a random-effects meta-analysis are all positive or negative.
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,
logml_iter = 5000,
iter = 5000,
silent_stan = TRUE,
...
)
y |
effect size per study. Can be provided as (1) a numeric vector, (2)
the quoted or unquoted name of the variable in |
SE |
standard error of effect size for each study. Can be a numeric
vector or the quoted or unquoted name of the variable in |
labels |
optional: character values with study labels. Can be a
character vector or the quoted or unquoted name of the variable in
|
data |
data frame containing the variables for effect size |
d |
|
tau |
|
prior |
prior probabilities over models (possibly unnormalized) in the
order |
logml |
how to estimate the log-marginal likelihood: either by numerical
integration ( |
summarize |
how to estimate parameter summaries (mean, median, SD,
etc.): Either by numerical integration ( |
ci |
probability for the credibility/highest-density intervals. |
rel.tol |
relative tolerance used for numerical integration using
|
logml_iter |
number of iterations (per chain) from the posterior
distribution of |
iter |
number of MCMC iterations for the random-effects meta-analysis. Needs to be larger than usual to estimate the probability of all random effects being ordered (i.e., positive or negative). |
silent_stan |
whether to suppress the Stan progress bar. |
... |
further arguments passed to |
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
fits and 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 the mode of
the truncated normal distribution 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 posterior summary statistics of the overall effect size in the model
ordered
refer to the the average/mean of the study-specific
effect sizes (as implied by the fitted truncated normal distribution) and
not to the location parameter d
of the truncated normal
distribution (which is only the mode, not the expected value of a truncated
normal distribution).
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=5000
per chain.
Haaf, J. M., & Rouder, J. N. (2018). Some do and some don’t? Accounting for variability of individual difference structures. Psychonomic Bulletin & Review, 26, 772–789. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3758/s13423-018-1522-x")}
meta_bma, meta_random
### Bayesian Meta-Analysis with Order Constraints (H1: d>0)
data(towels)
set.seed(123)
mo <- meta_ordered(logOR, SE, study, towels,
d = prior("norm", c(mean = 0, sd = .3), lower = 0)
)
mo
plot_posterior(mo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.