For some a types of models, an object representing the "fitted" model is persisted on disk when the model is run. This function will load that object into memory and return it.
read_fit_model(.mod, ...)
# S3 method for character
read_fit_model(.mod, ...)
# S3 method for bbi_nmbayes_model
read_fit_model(
.mod,
format = c("array", "df", "matrix", "list", "rvars"),
include_iph = TRUE,
...
)
# S3 method for bbi_stan_model
read_fit_model(.mod, ...)
a .bbi_{.model_type}_model
object
arguments passed through to methods.
The draws object format to return for bbi_nmbayes_model objects.
Whether to include data from *.iph
files, if they exist,
in the draws constructed for bbi_nmbayes_model objects.
NONMEM Bayes: Returns a posterior draws object.
Stan: Returns a cmdstanr
fit object of class "CmdStanMCMC"
. See the
?cmdstanr::CmdStanMCMC
docs for methods and information on this object.
Note: currently model_summary.bbi_stan_model()
calls this under the
hood because it contains methods to summarize model outputs and no
similar methods exist yet in bbr
for Stan.
read_fit_model(character)
: Takes a file path that will be passed to
bbr::read_model()
. The loaded model is then passed directly to the relevant
read_fit_model()
dispatch.
read_fit_model(bbi_nmbayes_model)
: Returns a posterior draws object.
read_fit_model(bbi_stan_model)
: Returns a cmdstanr::CmdStanMCMC
object.