Hi there, I am trying to create named output_files, so I can automate tracking the modelling progress. However, I am at a loss on how to do this. Any help appreciated.
prior1 <- prior(normal(0,10), class = b) +
prior(cauchy(0,2), class = sd)
fit1 <- brm(count ~ zAge + zBase * Trt + (1|patient),
data = epilepsy, family = poisson(), prior = prior1,
#basename = "test", timestamp = FALSE, random = FALSE,
#output_files=list(dir = ".", basename = "test", timestamp = FALSE, random = FALSE),
save_pars = save_pars(latent = TRUE),
Either NULL or a character string. In the latter case, the fitted model object is saved via saveRDS in a file named after the string supplied in file. The .rds extension is added automatically. If the file already exists, brm will load and return the saved model object instead of refitting the model. Unless you specify the file_refit argument as well, the existing files won’t be overwritten, you have to manually remove the file in order to refit and save the model under an existing file name. The file name is stored in the brmsfit object for later usage.
You can also pass arguments to
cmdstanr directly through the
... convention: Run Stan's MCMC algorithms — model-method-sample • cmdstanr
Sorry, I should have been clearer. I am looking for the sample_file equivalent of brms stanr backend.
See the commented out lines, where I unsuccessfully tried to define the basename without random numbers and timestamp.