A nonparametric distribution as a <dist_spec>, defined directly by its
probability mass function. The PMF can instead be left uncertain by
passing a Dirichlet() prior.
Arguments
- pmf
Probability mass function, as a zero-indexed numeric vector (the first entry is the mass at zero) or a
<dist_spec>(e.g. fromDirichlet()). A numeric vector is normalised to sum to one.- ...
Limits of the distribution, passed to
bound_dist().
Details
A distribution constructed with a Dirichlet() prior has no concrete PMF,
in the same way that Gamma(shape = Normal(3, 0.5), rate = 2) has an
uncertain shape in place of a fixed value. get_pmf() errors and
has_uncertainty() returns TRUE until fix_parameters() resolves the
prior into a PMF (e.g. with strategy = "mean").
See also
Distributions for an overview and the other distributions.