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().
pmcmc_parameter(
name,
initial,
min = -Inf,
max = Inf,
discrete,
integer = FALSE,
prior = NULL,
mean = NULL
)Name for the parameter (a string)
Initial value for the parameter
Optional minimum value for the parameter (otherwise
-Inf). If given, then initial must be at least this
value.
Optional max value for the parameter (otherwise
Inf). If given, then initial must be at most this
value.
Deprecated; use integer instead.
Logical, indicating if this parameter is
integer. If TRUE then the parameter will be rounded
after a new parameter is proposed.
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.
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.
pmcmc_parameter("a", 0.1)
#> $name
#> [1] "a"
#>
#> $initial
#> [1] 0.1
#>
#> $min
#> [1] -Inf
#>
#> $max
#> [1] Inf
#>
#> $integer
#> [1] FALSE
#>
#> $prior
#> function (p)
#> 0
#> <bytecode: 0x12bfb4f60>
#> <environment: 0x12bfb2240>
#>
#> $mean
#> [1] 0.1
#>
#> attr(,"class")
#> [1] "pmcmc_parameter"