Skip to contents

Save STbayes fits easily, rather than having to save the fit and chain csvs separately. Will provide a message with the command to re-load the fit for convenience.

Usage

STb_save(fit, output_dir = "cmdstan_saves", name = NULL)

Arguments

fit

model fitted by STbayes

output_dir

path of where do you want to save

name

optional name to use for model

Value

NULL, message if successfully saved.

Examples

if (FALSE) { # \dontrun{
data_list <- import_user_STb(STbayes::event_data, STbayes::edge_list)
model_obj <- generate_STb_model(data_list, gq = TRUE)
fit <- fit_STb(data_list,
    model_obj,
    parallel_chains = 4,
    chains = 4,
    cores = 4,
    iter = 4000,
    refresh = 2000
)
STb_save(fit, output_dir = "../data/stan_fits", name = "my_fit")
} # }