max.dist_spec: Returns the maximum of one or more delay distribution

View source: R/dist_spec.R

max.dist_specR Documentation

Returns the maximum of one or more delay distribution

Description

[Experimental] This works out the maximum of all the (parametric / nonparametric) delay distributions combined in the passed <dist_spec> (ignoring any uncertainty in parameters)

Usage

## S3 method for class 'dist_spec'
max(x, ...)

Arguments

x

The <dist_spec> to use

...

Not used

Value

A vector of means.

Examples

# A fixed gamma distribution with mean 5 and sd 1.
dist1 <- Gamma(mean = 5, sd = 1, max = 20)
max(dist1)

# An uncertain lognormal distribution with mean 3 and sd 2
dist2 <- LogNormal(mean = Normal(3, 0.5), sd = Normal(2, 0.5), max = 20)
max(dist2)

# The max the sum of two distributions
max(dist1 + dist2)

EpiNow2 documentation built on Oct. 31, 2024, 5:09 p.m.