par_named and par_range), sampled from a prior
distribution (par_prior) or can be derived from other parameters
(par_expr).par_expr(expr)par_const(constant)
par_named(name)
par_range(name, lower, upper)
par_prior(name, prior)
2 * a will create an
parameter that is twice the value of an existing parameter a).
Make sure that the expressiexpr, the expression is evaluated immediately and
can not depend on other named parameters.rnorm(1) gives a standard normal prior.par_expr: Creates a parameter with value determined by evaluating an
expression.par_const: Creates an parameter that is equal to a fixed value.
Different to par_expr, the value is evaluated on parameter creation.par_named: Creates an parameter whose value is specified via theparsargument insimulate.coalmodel.par_range: Creates an parameter that can take a range of possible
values.
Similar topar_named, the value of the parameter
used in a simulation is set via theparsargument.
This is primarily intended for creating model parameters forpar_prior: Creates a named parameter with a prior
distribution. Before each simulation, the expression for the prior
is evaluated. The resulting value can be used inpar_exprunder the chosen name.par_const(5)
par_named("x")
par_prior("y", rnorm(1))
par_range("z", 1, 5)
par_expr(2*x + y * z)Run the code above in your browser using DataLab