Learn R Programming

rtestim (version 1.0.1)

discretize_gamma: Compute the discretized density function for gamma distribution

Description

The serial interval distribution expresses the probability of the symptom onset of a secondary infection occurred a given number of days after the primary infection. The serial interval distribution is commonly represented by a discretized Gamma distribution in literature, parametrized by the shape and scale parameters.

Usage

discretize_gamma(x, shape = 2.5, scale = 2.5, rate = 1/scale)

Value

probability mass of the discretized gamma distribution

Arguments

x

locations (times) where cases are observed. Must be nonnegative.

shape, scale

shape and scale parameters. Must be positive, scale strictly.

rate

an alternative way to specify the scale.

Examples

Run this code
discretize_gamma(1:30, shape = 1, scale = 1)

Run the code above in your browser using DataLab