View source: R/smc2_parameters.R
smc2_parameter | R Documentation |
Describe a single parameter for use within the SMC^2. Note that
the name is not set here, but will end up being naturally defined
when used with smc2_parameters
, which collects
these together for use with smc2()
.
smc2_parameter(
name,
sample,
prior,
min = -Inf,
max = Inf,
discrete,
integer = FALSE
)
name |
Name for the parameter (a string) |
sample |
A sampling function; it must take a single argument
representing the number of sampled to be returned. Typically
this will be a |
prior |
A prior function. It must be a function that takes a single argument, being the value of this parameter. |
min |
Optional minimum value for the parameter (otherwise
|
max |
Optional max value for the parameter (otherwise
|
discrete |
Deprecated; use |
integer |
Logical, indicating if this parameter is an
integer. If |
mcstate::smc2_parameter("a",
function(n) rnorm(n),
function(x) dnorm(n, log = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.