Description Usage Arguments Value Examples
refit
Takes a stansim_simulation
object and a
vector of characters corresponding to the names of datasets fitted within
the stansim_simulation
object, and refits the stan model for each of
these instances. This allows users to refit any specific models using new
stan arguments if need be (e.g. if the model fails to converge in the
original run).
1 2 |
object |
An object of S3 class stansim_simulation. |
datasets |
The full names of the data files to be refitted. These must
be consistent both with the dataset names stored within the
|
stan_args |
A list of function arguments to be used by the internal
|
calc_loo |
If |
use_cores |
Number of cores to use when running in parallel. Each stan model is fitted serially regardless of the number of chains ran as parallelisation across models is more flexible than within. |
cache |
If |
seed |
Set a seed for the |
An S3 object of class stansim_simulation
recording relevant
simulation data.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# refit datasets "data_file-12.rds" & "data_file-08.rds"
refit(simulation,
datasets = c("data_file-12.rds", "data_file-08.rds")
use_cores = 4)
# refit dataset "data_file-12.rds" using a larger number of samples
refit(simulation,
datasets = "data_file-12.rds",
stan_args = list(iter = 4000),
use_cores = 4)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.