epiinf defines a model for latent infections.
For the basic version of the model, this defines the generation distribution of the disease, the number of days for which to seed infections, and the prior distribution on the parameter \(\tau\),
as described in the model description vignette. Recall that \(\tau\) is the prior mean on daily seeded infections. These three parameters are controlled by the arguments gen, seed_days and prior_seeds respectively.
epiinf( gen, seed_days = 6L, prior_seeds = hexp(prior_aux = rstanarm::exponential(0.03)), latent = FALSE, family = "normal", prior_aux = rstanarm::normal(10, 5), fixed_vtm = 1, pop_adjust = FALSE, pops = NULL, rm = NULL, prior_susc = NULL, prior_rm_noise = NULL )
A numeric vector representing the probability mass function for the generation time of the disease (must be a probability vector).
An integer giving the number of days for which to seed infections. Defaults to
Specifies the family for the prior distribution on daily infections. Only used if
Prior distribution for the auxiliary variable in the distribution for latent infections. Only used if
A character vector giving the name of the column in the dataframe corresponding to the population of each group.
A characted vector giving a column name in
Prior distribution on the initial susceptible population at time 0, expressed as a proportion of the total population size.
This quantity lies between 0 and 1, and is useful when the first modeled date is after the true beginning of an epidemic. Only used when
Removal from the susceptible population (to account for vaccinations) can be applied using the
An object of class
epiinf has additional arguments which allow the user to extend the basic model.
latent=TRUE replaces the renewal process with a model that treats latent infections as unknown parameters that are sampled along with other parameters. The
family argument then gives the distribution family for
latent infections, while
prior_aux defines the prior on the coefficient of dispersion \(d\) of this distribution.
Recall that one can adjust the infection process to explicitly model changes in infection rates as the remaining susceptible population is depleted.
In particular, the adjustment ensures that cumulative infections never breaches the initial susceptible population.
The adjustment was described in Section 5.3 of the model description article.
It can be employed by setting
pop_adjust = TRUE and using the
susceptibles argument to point towards a variable in the dataframe which gives the susceptible population at each point in time.