Skip to contents

A class for defining bernoulli priors to be translated to Stan code. Objects of class PriorBernoulli should not be created directly but by the constructor prior_bernoulli().

Slots

stan_code

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

n_param

integer. Number of prior parameters (1).

constraint

character. Support of prior distribution, "<lower=0, upper=1>".

theta

numeric. Probability (in [0, 1]).