| RoBMA | R Documentation |
Fits a robust Bayesian model-averaged meta-analysis. The default ensemble averages across models with and without an effect, heterogeneity, and publication-bias adjustment.
RoBMA(
yi,
vi,
sei,
weights,
ni,
mods,
scale,
cluster,
data,
slab,
subset,
measure,
effect_direction = "detect",
prior_effect,
prior_heterogeneity,
prior_mods,
prior_scale,
prior_heterogeneity_allocation,
prior_bias,
prior_effect_null,
prior_heterogeneity_null,
prior_mods_null,
prior_scale_null,
prior_heterogeneity_allocation_null,
prior_bias_null,
standardize_continuous_predictors = TRUE,
set_contrast_factor_predictors = "meandif",
prior_unit_information_sd,
rescale_priors = 1,
prior_informed_field,
prior_informed_subfield,
model_type = "PSMA",
sample = 5000,
burnin = 2000,
adapt = 500,
chains = 3,
thin = 1,
parallel = FALSE,
autofit = FALSE,
autofit_control = set_autofit_control(),
convergence_checks = set_convergence_checks(),
seed = NULL,
silent = TRUE,
...
)
yi |
a vector of effect sizes, or a formula with the effect size on the
left-hand side and location moderators on the right-hand side (for example
|
vi |
a vector of sampling variances. Either |
sei |
a vector of standard errors. Either |
weights |
an optional vector of positive likelihood weights. For normal/effect-size models, each weight powers the estimate likelihood. For constructors with GLMM raw-count input, each weight powers the paired two-arm likelihood for one study. |
ni |
an optional vector of sample sizes. Used for |
mods |
an optional matrix, data.frame, or formula specifying
location moderators (meta-regressors). Formula input is evaluated in |
scale |
an optional matrix, data.frame, or formula specifying
scale predictors for location-scale models. Formula input is evaluated in
|
cluster |
an optional vector of cluster identifiers for multilevel meta-analysis. |
data |
an optional data frame containing the variables. |
slab |
an optional vector of study labels. |
subset |
an optional logical or numeric vector specifying a subset of data to be used. |
measure |
a character string specifying the effect size measure.
Normal/effect-size constructors require an explicit value and support
|
effect_direction |
direction used by publication-bias adjustments.
|
prior_effect |
prior distribution(s) for the alternative effect component(s). |
prior_heterogeneity |
prior distribution(s) for the alternative heterogeneity component(s). |
prior_mods |
prior distribution(s) for alternative moderator components. A single prior applies to all terms; a named list can specify term-specific components. |
prior_scale |
prior distribution(s) for alternative scale-regression components. A single prior applies to all terms; a named list can specify term-specific components. |
prior_heterogeneity_allocation |
prior distribution(s) for the alternative cluster-level heterogeneity allocation component(s). |
prior_bias |
prior distribution(s) for alternative publication-bias component(s), such as weight functions, PET, or PEESE. Alternative prior arguments can be:
See |
prior_effect_null |
prior distribution(s) for the null effect component(s). |
prior_heterogeneity_null |
prior distribution(s) for the null heterogeneity component(s). |
prior_mods_null |
prior distribution(s) for null moderator components. A single prior applies to all terms; a named list can specify term-specific components. |
prior_scale_null |
prior distribution(s) for null scale-regression components. A single prior applies to all terms; a named list can specify term-specific components. |
prior_heterogeneity_allocation_null |
prior distribution(s) for the null cluster-level heterogeneity allocation component(s). |
prior_bias_null |
prior distribution(s) for null publication-bias
component(s), usually Null prior arguments can be:
Defaults to a point mass (spike) at zero for effect and heterogeneity parameters. |
standardize_continuous_predictors |
logical. Whether to standardize continuous predictors.
Defaults to |
set_contrast_factor_predictors |
character. How to set contrast for factor predictors.
Defaults are constructor-specific and shown in each function usage; single-model
constructors use |
prior_unit_information_sd |
numeric. The unit information standard deviation ( |
rescale_priors |
numeric. A scaling factor for supported prior distributions.
Point and none priors are unchanged. For constructors with publication-bias
prior distributions, |
prior_informed_field |
character. The field of the informed prior distributions.
Omit to use the standard default prior specification; explicit |
prior_informed_subfield |
character. The subfield of the informed prior distributions.
Omit to use the field-specific default, such as |
model_type |
character string specifying predefined publication-bias model ensembles. One of:
Custom |
sample |
numeric. Number of MCMC samples to save. Defaults to |
burnin |
numeric. Number of burn-in iterations. Defaults to |
adapt |
numeric. Number of adaptation iterations. Defaults to |
chains |
numeric. Number of MCMC chains. Defaults to |
thin |
numeric. Thinning interval. Defaults to |
parallel |
logical. Whether to run MCMC chains in parallel. Defaults to |
autofit |
logical. Whether to automatically extend the MCMC chains if convergence is not met.
Defaults to |
autofit_control |
list of autofit control settings. See |
convergence_checks |
list of convergence check settings. See |
seed |
numeric. Random seed for reproducibility. Defaults to |
silent |
logical. Whether to suppress output. Constructors with no
explicit default use |
... |
additional advanced arguments. Fitting functions reject unused
arguments; currently recognized internal arguments include |
RoBMA() uses product-space Bayesian model averaging. Inclusion Bayes
factors and model-averaged estimates are obtained from mixture priors for
effect, heterogeneity, moderators, scale regression, and publication-bias
components.
By default, model_type = "PSMA" includes selection-model weight functions
together with PET and PEESE publication-bias adjustments. Use BMA() for
model averaging without publication-bias adjustment, or brma() for fitting
a single meta-analytic model.
RoBMA() uses normal/effect-size input (yi with vi or sei). Raw-count
GLMM model averaging is provided by BMA.glmm().
Product-space objects support predictive comparison with add_loo() and
add_waic(). Bridge-sampling marginal likelihood via add_marglik() is
not available for product-space model-averaging objects.
A fitted object of class c("RoBMA", "brma"). The object contains
checked data, checked priors, the JAGS fit, cached summary, and
cached coefficients. It can be passed to summary(), plot(),
predict(), funnel(), add_loo(), and related methods.
publication_bias_prior_specification, BMA(), brma(),
bselmodel(), bPET(), bPEESE(), summary.brma(), plot.brma()
## Not run:
if (requireNamespace("metadat", quietly = TRUE)) {
data(dat.lehmann2018, package = "metadat")
fit <- RoBMA(
yi = yi,
vi = vi,
data = dat.lehmann2018,
measure = "SMD",
seed = 1,
silent = TRUE
)
summary(fit)
plot(fit)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.