pmcmc_parameter: Describe single pmcmc parameter

View source: R/pmcmc_parameters.R

pmcmc_parameterR Documentation

Describe single pmcmc parameter

Description

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

Usage

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

Arguments

name

Name for the parameter (a string)

initial

Initial value for 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.

mean

Optionally, an estimate of the mean of the parameter. If not given, then we assume that initial is a reasonable estimate. This is used only in adaptive mcmc.

Examples

pmcmc_parameter("a", 0.1)

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