get_stan_sampler_args | R Documentation |
Returns a list of parameters for the Stan sampler
get_stan_sampler_args(
chains = 4,
cores = chains,
iter = 2000,
warmup = floor(iter/2),
thin = 1,
seed = sample.int(.Machine$integer.max, 1),
check_data = TRUE,
sample_file = NULL,
diagnostic_file = NULL,
verbose = FALSE,
algorithm = c("NUTS", "HMC", "Fixed_param"),
control = NULL,
include = TRUE,
open_progress = interactive() && !isatty(stdout()) && !identical(Sys.getenv("RSTUDIO"),
"1"),
show_messages = TRUE,
...
)
chains |
A positive integer specifying the number of Markov chains. The default is 4. |
cores |
Number of cores to use when executing the chains in parallel,
which defaults to 1 but we recommend setting the |
iter |
A positive integer specifying the number of iterations for each chain (including warmup). The default is 2000. |
warmup |
A positive integer specifying the number of warmup (aka burnin)
iterations per chain. If step-size adaptation is on (which it is by default),
this also controls the number of iterations for which adaptation is run (and
hence these warmup samples should not be used for inference). The number of
warmup iterations should be smaller than |
thin |
A positive integer specifying the period for saving samples. The default is 1, which is usually the recommended value. |
seed |
The seed for random number generation. The default is generated
from 1 to the maximum integer supported by R on the machine. Even if
multiple chains are used, only one seed is needed, with other chains having
seeds derived from that of the first chain to avoid dependent samples.
When a seed is specified by a number, |
check_data |
Logical, defaulting to |
sample_file |
An optional character string providing the name of a file.
If specified the draws for all parameters and other saved quantities
will be written to the file. If not provided, files are not created.
When the folder specified is not writable, |
diagnostic_file |
An optional character string providing the name of a file.
If specified the diagnostics data for all parameters will be written
to the file. If not provided, files are not created. When the folder specified
is not writable, |
verbose |
|
algorithm |
One of sampling algorithms that are implemented in Stan.
Current options are |
control |
A named |
include |
Logical scalar defaulting to |
open_progress |
Logical scalar that only takes effect if
|
show_messages |
Either a logical scalar (defaulting to |
... |
Additional arguments can be |
a named list
get_stan_sampler_args()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.