Skip to contents

distspec represents probability distributions (typically epidemiological delays, such as generation times or reporting delays) as <dist_spec> objects. Each supported distribution has its own constructor: LogNormal(), Gamma(), Normal(), Exponential(), Weibull(), Beta(), Fixed(), NonParametric() and Dirichlet().

Details

A parameter can be given either as a fixed numeric value or as an uncertain value (another <dist_spec>); currently only normally distributed uncertain parameters (from Normal()) are supported.

Each distribution has a "natural" (canonical) parameterisation, such as shape and rate for Gamma() or meanlog and sdlog for LogNormal(). It can sometimes also be specified using other parameters, such as its mean and standard deviation, which are then converted to the natural parameters (propagating any uncertainty with a first-order delta-method approximation).

See also

discretise() and collapse() to discretise and convolve distributions, sample_dist() to draw samples, and get_parameters() / get_pmf() to inspect them.