Construct parameters for use with
smc2()
. This creates a utility object that is used
internally to work with parameters. Most users only need to
construct this object, but see the examples for how it can be
used.
new()
Create the smc2_parameters object
smc2_parameters$new(parameters, transform = NULL)
parameters
A list
of
smc2_parameter objects, each of which describe a
single parameter in your model. If parameters
is named, then
these names must match the $name
element of each parameter is
used (this is verified).
transform
An optional transformation function to apply to your parameter vector immediately before passing it to the model function. If not given, then as.list is used, as dust models require this. However, if t you need to generate derived parameters from those being actively sampled you can do arbitrary transformations here.
sample()
Create n
independent random parameter vectors (as a
matrix with n
rows)
summary()
Return a data.frame
with information about
parameters (name, min, max, and integer).
propose()
Propose a new parameter vector given a current parameter
vector and variance covariance matrix. After proposal, this rounds
any integer values, and reflects bounded parameters until they lie
within min
:max
.