Provides a convenient way of defining parameters in the format required by run_mcmc(). Each parameter must have the following three elements, defined in order:

  • name - the parameter name.

  • min - the minimum value of the parameter. -Inf is allowed.

  • max - the maximum value of the parameter. Inf is allowed.

There following arguments are also optional:

  • init - the initial value of the parameter. If running multiple chains a vector of initial values can be used to specify distinct values for each chain.

  • block - which likelihood block(s) this parameter belongs to. See vignettes for instructions on using likelihood blocks.

define_params(...)

Arguments

...

a series of named input arguments.

Examples

define_params(name = "mu", min = -10, max = 10, init = 0, name = "sigma", min = 0, max = 5, init = c(1, 2))
#> name min max init #> 1 mu -10 10 0 #> 2 sigma 0 5 1, 2
define_params(name = "mu1", min = -10, max = 10, init = 0, block = 1, name = "mu2", min = -10, max = 10, init = 0, block = 2, name = "sigma", min = 0, max = 5, init = 1, block = c(1, 2))
#> name min max init block #> 1 mu1 -10 10 0 1 #> 2 mu2 -10 10 0 2 #> 3 sigma 0 5 1 1, 2