increase_iterations
checks brmsfit objects save as RDS files.
increase_iterations(
path = ".",
fits = list.files(path = path, pattern = ".RDS$", ignore.case = TRUE, full.names =
TRUE),
cores = 1,
pb = TRUE,
check.rhat = FALSE,
increase = "2x",
chains = 4,
robust = TRUE,
html = FALSE,
verbose = TRUE
)
Directory in which to look for .rds files.
Name of the .rds files to be read. Optional.
Number of cores to use for parallelization. Default is 1 (no parallelization).
Logical to control if a progress bar is used. Default is TRUE.
NOT YET IMPLEMENTED.
NOT YET IMPLEMENTED.
NOT YET IMPLEMENTED.
Logical to control the type of central tendency measure as in summary.brmsfit
). NOT YET IMPLEMENTED.
Logical to control whether results are returned in html format. Useful for creating Rmd or quarto html reports. Is FALSE (default) the table is return as a data frame object. NOT YET IMPLEMENTED.
Logical to control if messages are printed into the console. NOT YET IMPLEMENTED.
Returns a data frame with a summary of fitted models. Can be used to make sure all models were run with the same parameters (e.g. before combining models). If html = FALSE
the function will return a data frame, otherwise it will print the estimates in a table in html format. The summary includes: prior, formula, number of iterations, number of chain, thinning, warmup, number of parameters, number of divergent transitions, number of rhats higher than 1.05, tail and bulk effective sample sizes and seed.
The function reads all fits saved as rds files in the supplied directory and generates a table listing the parameters used to fit models.
Araya-Salas (2022), brmsish: miscellaneous functions to customize brms bayesian regression models. R package version 1.0.0.Paul-Christian Buerkner (2017). brms: An R Package for Bayesian Multilevel Models Using Stan. Journal of Statistical Software, 80(1), 1-28. doi:10.18637/jss.v080.i01
{
# create directory
dir.create(file.path(tempdir(), "rdss"))
# run 2 models
md1 <- brm(Petal.Length ~ Petal.Width + Species, iris, chains = 1,
iter = 500, file = file.path(tempdir(), "rdss", "md1"))
md2 <- brm(Petal.Length ~ Species, iris, chains = 1,
iter = 500, file = file.path(tempdir(), "rdss", "md2"))
# check fits
increase_iterations(path = file.path(tempdir(), "rdss"))
}
#> Warning: '/tmp/RtmpbELMrV/rdss' already exists
#> Compiling Stan program...
#> Error in .fun(model_code = .x1): Boost not found; call install.packages('BH')