create_stan_args: Create a List of Stan Arguments
Description
![[Stable]](figures/lifecycle-stable.svg?package=EpiNow2&version=1.6.1) Generates a list of arguments as required by the stan sampling functions by
combining the required options with data, and type of initialisation.
Initialisation defaults to random but it is expected that
Generates a list of arguments as required by the stan sampling functions by
combining the required options with data, and type of initialisation.
Initialisation defaults to random but it is expected that
create_initial_conditions() will be used.
Usage
create_stan_args(
  stan = stan_opts(),
  data = NULL,
  init = "random",
  model = "estimate_infections",
  fixed_param = FALSE,
  verbose = FALSE
)
Value
A list of stan arguments
Arguments
- stan
- A list of stan options as generated by - stan_opts(). Defaults
to- stan_opts(). Can be used to override- data,- init, and- verbosesettings if desired.
 
- data
- A list of stan data as created by - create_stan_data()
 
- init
- Initial conditions passed to - {rstan}. Defaults to "random"
(initial values randomly drawn between -2 and 2) but can also be a
function (as supplied by- create_initial_conditions()).
 
- model
- Character, name of the model for which arguments are
to be created. 
- fixed_param
- Logical, defaults to - FALSE. Should arguments be
created to sample from fixed parameters (used by simulation functions).
 
- verbose
- Logical, defaults to - FALSE. Should verbose progress
messages be returned.
 
Examples
Run this codeif (FALSE) {
# default settings
create_stan_args()
# increasing warmup
create_stan_args(stan = stan_opts(warmup = 1000))
}
Run the code above in your browser using DataLab