bayesnechurdlefitR/bayesnechurdlefit-methods.R
amend.bayesnechurdlefit.RdAdds or drops models from both components of a
bayesnechurdlefit
# S3 method for class 'bayesnechurdlefit'
amend(
object,
drop,
add,
loo_controls,
x_range = NULL,
resolution = NULL,
sig_val = NULL,
priors,
prior_type = NULL,
asymptote_observed = NULL,
timeout = Inf,
predictor_scale = NULL
)An object of class bayesnechurdlefit.
A character vector containing the names of
model types you which to exclude for the modified fit. A
bayesnecfit contains a single model, so there is nothing that
can be dropped from it and drop is an error in that case.
A character vector containing the names of
model types you which to include to the modified fit. Adding models to a
bayesnecfit promotes it to a bayesmanecfit.
A named list as for
bnec. An element not named
is taken from object: "fitting" holds the arguments object
was built with, and "weights" holds them where they name the method its
model weights were computed by. A "weights" list that names no method keeps
that method. The report_k element controls diagnostic messages when
the amended set is assembled; it does not change the scores or weights.
As for bnec. Each is taken
from object unless supplied, and is the bnec default
where object records none. The estimates of every model in the
amended set are computed again with them, including the models already
fitted. Supplying these arguments alone recomputes the estimates without
refitting any model.
An object of class brmsprior which
specifies user-desired prior distributions of model parameters. It can also
be specified as a named list where each name identifies
a model and occurs only once. Where it is not supplied, the
prior of the call that fitted object is used as described in
Details, and the default priors are built for each parameter it does not
cover.
A character string selecting the set of
default priors to build for any newly added models, either
"uninformative" or "regularizing". See bnec.
Taken from object unless supplied, and "uninformative" where
object records none.
A logical declaring whether
the highest predictor level reached the lower asymptote, applied to the
default priors and the initial-value search of any newly added models. See
bnec. Taken from object unless supplied, and
TRUE where object records none.
A positive numeric giving the maximum
number of seconds allowed for fitting any single model, passed to
withTimeout. This is useful when fitting multiple
models, as it allows a model that is taking excessively long (for example
because of highly divergent chains) to be abandoned so that the remaining
models can still be fitted. A model that exceeds timeout is treated
as a failed fit and dropped from the returned set. The default Inf
imposes no limit. Requires the R.utils package to be installed when a
finite value is supplied.
A character string declaring
whether the predictor is supplied as "concentration", already
"log" transformed, or should use the "auto" rule, for the
priors of any newly added models. See bnec. Taken from
object unless supplied, and "auto" where object
records none.
An object of class bayesnechurdlefit.
Applied to both components, so that the two model sets stay in
step. Where a model is valid for one component but not the other – the
survival component is 0-1 bounded and the growth component may not be –
bnec will drop it from that component only, and the sets will
legitimately differ.
An argument that is not supplied is taken by each component from its own
fit, as amend describes. The growth component therefore keeps
the whole concentration series as its x_range, which
bnec_hurdle gave it.