ModelParameter

ModelParameter(
    parameter,
    value=None,
    lower=None,
    upper=None,
    fixed=None,
    prior=None,
)

Bounds, a fixed flag, a prior, or a starting value for one model parameter.

Supplying a prior replaces the model’s default. Do that together with use_default_flat_priors=False on the model, so a later data assignment cannot overwrite what you set.

Parameters

Name Type Description Default
parameter str or int The parameter to constrain, as a name ("scale") or a 1-based position. In a model carrying trends the parameter vector is wider than the distribution’s, so a position is required there. required
value float Starting value. A parameter_values vector on the model wins over this. None
lower float Bounds used by the estimators and samplers. None
upper float Bounds used by the estimators and samplers. None
fixed bool Hold the parameter at its value instead of estimating it. None
prior Distribution The parameter’s prior distribution. None

Examples

>>> model_parameter("scale", lower=0.5, upper=40)
<ModelParameter scale: lower = 0.5, upper = 40>