Skip to contents

Computes the discretised probability mass function of a parametric delay distribution using primary-event censoring via primarycensored::dprimarycensored(), the same method epinowcast relies on for delay distributions. The PMF is over delays 0:(max_delay - 1), truncated at max_delay. Parameters use the distribution's natural parameterisation (e.g. meanlog/sdlog for the lognormal); the refp_mean_int/refp_sd_int parameters are mapped accordingly.

Usage

.discretise_parametric_pmf(mu, sigma, max_delay, distribution = "lognormal")

Arguments

mu

Location parameter on the modelled scale (refp_mean_int).

sigma

Scale parameter on the modelled scale (refp_sd_int). Ignored for the exponential distribution.

max_delay

Maximum delay (number of delay slots, delays `0:(max_delay

  • 1)`).

distribution

One of "lognormal", "gamma", "exponential", or "loglogistic".

Value

A numeric vector of length max_delay summing to 1.