define_params: Define parameters dataframe

View source: R/main.R

define_paramsR Documentation

Define parameters dataframe

Description

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.

Usage

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))
              
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))

mrc-ide/drjacoby documentation built on July 1, 2024, 11:50 a.m.