Learn R Programming

EpiLPS (version 1.3.0)

Idist: Density function and discrete distribution for a disease interval

Description

This function computes the probability density function and probability mass function for a disease interval (e.g. the serial interval defined as the time elapsed between the symptom onset in an infector and the onset of symptoms in the secondary cases generated by that infector). It takes as input the mean and the standard deviation of the disease interval (expressed in days) and gives as an output the interval distribution based on a chosen parametric family.

Usage

Idist(mean, sd, dist = c("gamma", "weibull", "lognorm"), probs = NULL)

Value

A list of class Idist containing a vector of probabilities corresponding to the discrete distribution of the disease interval, the name of the chosen parametric distribution and its parameters.

Arguments

mean

The mean of the disease interval (must be larger than 1).

sd

A positive and finite real number corresponding to the standard deviation of the disease interval.

dist

A choice among a Gamma, Weibull or Log-normal distribution for the disease interval.

probs

A vector of probabilities for the interval distribution.

Author

Oswaldo Gressani oswaldo_gressani@hotmail.fr

Details

The discretization is based on the formula in Held et al. (2019).

References

Held, L., Hens, N., D O'Neill, P., and Wallinga, J. (2019). Handbook of infectious disease data analysis. CRC Press.

Examples

Run this code
Idist(mean = 2.6, sd = 1.5)

Run the code above in your browser using DataLab