dist_spec_plus: Creates a delay distribution as the sum of two other delay...

dist_spec_plusR Documentation

Creates a delay distribution as the sum of two other delay distributions

Description

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.

Usage

dist_spec_plus(e1, e2, tolerance = 0.001)

Arguments

e1

The first delay distribution (from a call to dist_spec()) to combine.

e2

The second delay distribution (from a call to dist_spec()) to combine.

tolerance

A numeric value that sets the cumulative probability to retain when truncating the cumulative distribution function of the combined nonparametric delays. The default value is 0.001 with this retaining 0.999 of the cumulative probability. Note that using a larger tolerance may result in a smaller number of points in the combined nonparametric delay but may also impact the accuracy of the combined delay (i.e., change the mean and standard deviation).

Value

A delay distribution representing the sum of the two delays (with class dist_spec())

Author(s)

Sebastian Funk

Sam Abbott


EpiNow2 documentation built on Sept. 26, 2023, 5:11 p.m.