Skip to contents

[Experimental] This removes any part of the tail of the nonparametric distributions in the <dist_spec> where the probability mass is below the threshold level.

Usage

apply_tolerance(x, tolerance)

Arguments

x

A <dist_spec>

tolerance

Numeric; the desired tolerance level.

Value

A <dist_spec> where probability masses below the threshold level have been removed

Examples

dist <- discretise(Gamma(mean = 5, sd = 1, max = 20))
apply_tolerance(dist, 0.01)
#> - nonparametric distribution
#>   PMF: [8e-11 2.4e-05 0.0056 0.079 0.26 0.34 0.22 0.077 0.016]