Skip to contents

A class for defining priors to be translated to Stan code. Objects of class Prior should not be created directly but by one of the specific prior class constructors.

Slots

stan_code

character. Stan implementation of the prior, with placeholders for parameters surrounded with {{ and }} to be replaced with glue::glue().

n_param

integer. Number of prior parameters.

constraint

character. Support of prior distribution expressed as a Stan constraint, e.g. "<lower=0, upper=1>".