Skip to contents

[Stable] Returns a truncation distribution formatted for usage by downstream functions. See estimate_truncation() for an approach to estimate these distributions.


trunc_opts(dist = Fixed(0), tolerance = 0.001, weight_prior = FALSE)



A delay distribution or series of delay distributions reflecting the truncation. It can be specified using the probability distributions interface in EpiNow2 (See ?EpiNow2::Distributions) or estimated using estimate_truncation(), which returns a dist object, suited for use here out-of-box. Default is a fixed distribution with maximum 0, i.e. no truncation.


Numeric; the desired tolerance level. Any part of the cumulative distribution function beyond 1 minus this tolerance level is removed.


Logical; if TRUE, the truncation prior will be weighted by the number of observation data points, in doing so approximately placing an independent prior at each time step and usually preventing the posteriors from shifting. If FALSE (default), no weight will be applied, i.e. the truncation distribution will be treated as a single parameter.


A <trunc_opts> object summarising the input truncation distribution.


# no truncation
#> - fixed value:
#>   0

# truncation dist
trunc_opts(dist = LogNormal(mean = 3, sd = 2, max = 10))
#> - lognormal distribution (max: 10):
#>   meanlog:
#>     0.91
#>   sdlog:
#>     0.61