+.dist_spec | R Documentation |
This is done via convolution with stats::convolve()
. Nonparametric delays
that can be combined are processed together, and their cumulative
distribution function is truncated at a specified tolerance level, ensuring
numeric stability.
## S3 method for class 'dist_spec'
e1 + e2
e1 |
The first delay distribution (from a call to |
e2 |
The second delay distribution (from a call to |
A delay distribution representing the sum of the two delays
(with class dist_spec()
)
Sebastian Funk
# A fixed lognormal distribution with mean 5 and sd 1.
lognormal <- dist_spec(
mean = 1.6, sd = 1, max = 20, distribution = "lognormal"
)
lognormal + lognormal
# An uncertain gamma distribution with mean 3 and sd 2
gamma <- dist_spec(
mean = 3, sd = 2, mean_sd = 0.5, sd_sd = 0.5, max = 20,
distribution = "gamma"
)
lognormal + gamma
# Using tolerance parameter
EpiNow2:::dist_spec_plus(lognormal, lognormal, tolerance = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.