if2_parameter: Describe single IF2 parameter

View source: R/if2_parameters.R

if2_parameterR Documentation

Describe single IF2 parameter

Description

Describe a single parameter for use within IF2. Note that the name is not set here, but will end up being naturally defined when used with if2_parameters, which collects these together for use with if2().

Usage

if2_parameter(
  name,
  initial,
  min = -Inf,
  max = Inf,
  discrete,
  integer = FALSE,
  prior = NULL
)

Arguments

name

Name for the parameter (a string)

initial

Initial value of the parameter

min

Optional minimum value for the parameter (otherwise -Inf). If given, then initial must be at least this value.

max

Optional max value for the parameter (otherwise Inf). If given, then initial must be at most this value.

discrete

Deprecated; use integer instead.

integer

Logical, indicating if this parameter is integer. If TRUE then the parameter will be rounded after a new parameter is proposed.

prior

A prior function (if not given an improper flat prior is used - be careful!). It must be a function that takes a single argument, being the value of this parameter. If given, then prior(initial) must evaluate to a finite value.

Examples

mcstate::if2_parameter("a", 0.1)

mrc-ide/mcstate documentation built on July 3, 2024, 1:34 p.m.