NoBMA.reg {RoBMA} | R Documentation |
Estimate a Bayesian Model-Averaged Meta-Regression
Description
NoBMA.reg
is a wrapper around RoBMA.reg()
that can
be used to estimate a (Normal - publication bias unadjusted) Bayesian
model-averaged meta-regression. The interface allows a complete customization of
the ensemble with different prior (or list of prior) distributions
for each component.
Usage
NoBMA.reg(
formula,
data,
test_predictors = TRUE,
study_names = NULL,
study_ids = NULL,
transformation = if (any(colnames(data) != "y")) "fishers_z" else "none",
prior_scale = if (any(colnames(data) != "y")) "cohens_d" else "none",
standardize_predictors = TRUE,
priors = NULL,
model_type = NULL,
priors_effect = prior(distribution = "normal", parameters = list(mean = 0, sd = 1)),
priors_heterogeneity = prior(distribution = "invgamma", parameters = list(shape = 1,
scale = 0.15)),
priors_effect_null = prior(distribution = "point", parameters = list(location = 0)),
priors_heterogeneity_null = prior(distribution = "point", parameters = list(location =
0)),
priors_hierarchical = prior("beta", parameters = list(alpha = 1, beta = 1)),
priors_hierarchical_null = NULL,
prior_covariates = prior("normal", parameters = list(mean = 0, sd = 0.25)),
prior_covariates_null = prior("spike", parameters = list(location = 0)),
prior_factors = prior_factor("mnormal", parameters = list(mean = 0, sd = 0.25),
contrast = "meandif"),
prior_factors_null = prior_factor("spike", parameters = list(location = 0), contrast =
"meandif"),
chains = 3,
sample = 5000,
burnin = 2000,
adapt = 500,
thin = 1,
parallel = FALSE,
autofit = TRUE,
autofit_control = set_autofit_control(),
convergence_checks = set_convergence_checks(),
save = "all",
seed = NULL,
silent = TRUE,
...
)
Arguments
formula |
a formula for the meta-regression model |
data |
a data object created by the |
test_predictors |
vector of predictor names that will be test
(i.e., assigned both the null and alternative prior distributions).
Defaults to |
study_names |
an optional argument with the names of the studies |
study_ids |
an optional argument specifying dependency between the
studies (for using a multilevel model). Defaults to |
transformation |
transformation to be applied to the supplied
effect sizes before fitting the individual models. Defaults to
|
prior_scale |
a scale used to define priors. Defaults to |
standardize_predictors |
whether continuous predictors should be standardized prior to
estimating the model. Defaults to |
priors |
named list of prior distributions for each predictor
(with names corresponding to the predictors). It allows users to
specify both the null and alternative hypothesis prior distributions
for each predictor by assigning the corresponding element of the named
list with another named list (with |
model_type |
string specifying the RoBMA ensemble. Defaults to |
priors_effect |
list of prior distributions for the effect size ( |
priors_heterogeneity |
list of prior distributions for the heterogeneity |
priors_effect_null |
list of prior distributions for the effect size ( |
priors_heterogeneity_null |
list of prior distributions for the heterogeneity |
priors_hierarchical |
list of prior distributions for the correlation of random effects
( |
priors_hierarchical_null |
list of prior distributions for the correlation of random effects
( |
prior_covariates |
a prior distributions for the regression parameter
of continuous covariates on the effect size under the alternative hypothesis
(unless set explicitly in |
prior_covariates_null |
a prior distributions for the regression parameter
of continuous covariates on the effect size under the null hypothesis
(unless set explicitly in |
prior_factors |
a prior distributions for the regression parameter
of categorical covariates on the effect size under the alternative hypothesis
(unless set explicitly in |
prior_factors_null |
a prior distributions for the regression parameter
of categorical covariates on the effect size under the null hypothesis
(unless set explicitly in |
chains |
a number of chains of the MCMC algorithm. |
sample |
a number of sampling iterations of the MCMC algorithm.
Defaults to |
burnin |
a number of burnin iterations of the MCMC algorithm.
Defaults to |
adapt |
a number of adaptation iterations of the MCMC algorithm.
Defaults to |
thin |
a thinning of the chains of the MCMC algorithm. Defaults to
|
parallel |
whether the individual models should be fitted in parallel.
Defaults to |
autofit |
whether the model should be fitted until the convergence
criteria (specified in |
autofit_control |
allows to pass autofit control settings with the
|
convergence_checks |
automatic convergence checks to assess the fitted
models, passed with |
save |
whether all models posterior distributions should be kept
after obtaining a model-averaged result. Defaults to |
seed |
a seed to be set before model fitting, marginal likelihood
computation, and posterior mixing for reproducibility of results. Defaults
to |
silent |
whether all print messages regarding the fitting process
should be suppressed. Defaults to |
... |
additional arguments. |
Details
See RoBMA()
for more details.
Note that these default prior distributions are relatively wide and more informed prior distributions for testing for the presence of moderation should be considered.
See RoBMA.reg()
for more details.
Value
NoBMA.reg
returns an object of class 'RoBMA'.
See Also
RoBMA()
, RoBMA.reg()
, summary.RoBMA()
, update.RoBMA()
, check_setup()