A wrapper around fit_disc_gamma to fit a discrete gamma distribution to incubation periods derived from exposure and onset dates. Can take into account uncertain dates of exposure.
fit_gamma_incubation_dist(x, date_of_onset, exposure, exposure_end = NULL, nsamples = 1000, ...)
the linelist data (data.frame or linelist object) containing at least a column containing the exposure dates and one containing the onset dates.
the name of the column containing the onset dates (bare variable name or in quotes)
the name of the column containing the exposure dates (bare variable name or in quotes)
the name of a column containing dates representing the end of the exposure period. This is `NULL` by default, indicating all exposures are known and in the `exposure` column.
The number of samples to draw from the empirical distribution to fit on (dafaults to 1000)
passed to fit_disc_gamma