update.RoBSA
can be used to
add an additional model to an existing "RoBSA"
object by
specifying the distribution, and either null or alternative priors
for each parameter and prior weight of the model,
change the prior weights of fitted models by specifying a vector
prior_weights
of the same length as the fitted models,
refitting models that failed to converge with updated settings of control parameters,
or changing the convergence criteria and recalculating the ensemble
results by specifying new control
argument and setting
refit_failed == FALSE
.
# S3 method for RoBSA
update(
object,
refit_failed = TRUE,
formula = NULL,
priors = NULL,
test_predictors = "",
distribution = NULL,
model_weights = 1,
prior_beta_null = get_default_prior_beta_null(),
prior_beta_alt = get_default_prior_beta_alt(),
prior_factor_null = get_default_prior_factor_null(),
prior_factor_alt = get_default_prior_factor_alt(),
prior_intercept = get_default_prior_intercept(),
prior_aux = get_default_prior_aux(),
chains = NULL,
adapt = NULL,
burnin = NULL,
sample = NULL,
thin = NULL,
autofit = NULL,
parallel = NULL,
autofit_control = NULL,
convergence_checks = NULL,
save = "all",
seed = NULL,
silent = TRUE,
...
)
a fitted RoBSA object
whether failed models should be refitted. Relevant only
if new priors or prior_weights
are not supplied. Defaults to TRUE
.
formula for the survival model
names list of prior distributions for each
predictor. It allows users to specify both the null and alternative
hypothesis prior distributions by assigning a named list
(with "null"
and "alt"
object) to the predictor
vector of predictor names
to be tested with Bayesian model-averaged testing.
Defaults to NULL
, no parameters are tested.
a distribution of the new model.
either a single value specifying prior model weight of a newly specified model using priors argument, or a vector of the same length as already fitted models to update their prior weights.
default prior distribution for the null hypotheses of continuous predictors
default prior distribution for the alternative hypotheses of continuous predictors
default prior distribution for the null hypotheses of categorical predictors
default prior distribution for the alternative hypotheses of categorical predictors
named list containing prior distribution for the intercepts (with names corresponding to the distributions)
named list containing prior distribution for the auxiliary parameters (with names corresponding to the distributions)
a number of chains of the MCMC algorithm.
a number of adaptation iterations of the MCMC algorithm.
Defaults to 500
.
a number of burnin iterations of the MCMC algorithm.
Defaults to 2000
.
a number of sampling iterations of the MCMC algorithm.
Defaults to 5000
.
a thinning of the chains of the MCMC algorithm. Defaults to
1
.
whether the model should be fitted until the convergence
criteria (specified in autofit_control
) are satisfied. Defaults to
TRUE
.
whether the individual models should be fitted in parallel.
Defaults to FALSE
. The implementation is not completely stable
and might cause a connection error.
allows to pass autofit control settings with the
set_autofit_control()
function. See ?set_autofit_control
for
options and default settings.
automatic convergence checks to assess the fitted
models, passed with set_convergence_checks()
function. See
?set_convergence_checks
for options and default settings.
whether all models posterior distributions should be kept
after obtaining a model-averaged result. Defaults to "all"
which
does not remove anything. Set to "min"
to significantly reduce
the size of final object, however, some model diagnostics and further
manipulation with the object will not be possible.
a seed to be set before model fitting, marginal likelihood
computation, and posterior mixing for reproducibility of results. Defaults
to NULL
- no seed is set.
whether all print messages regarding the fitting process
should be suppressed. Defaults to TRUE
. Note that parallel = TRUE
also suppresses all messages.
additional arguments.
update.RoBSA
returns an object of class 'RoBSA'.
See RoBSA()
for more details.