epiobs
defines a model for an observation vector. These observations
are taken to be a function of the latent infections in the population.
Examples include daily death or hospitalization rates. For more details on
the model assumptions please refer to the model description
vignette.
epiobs( formula, i2o, family = "neg_binom", link = "logit", center = FALSE, prior = rstanarm::normal(scale = 0.2), prior_intercept = rstanarm::normal(scale = 0.2), prior_aux = rstanarm::normal(location = 10, scale = 5), ... )
formula | An object of class |
---|---|
i2o | A numeric (simplex) vector defining the probability mass function of the time distribution from infection to observation (i.e. a single death or hospitalization etc.). The \(n\)th element represents the probability that the individual was infected exactly \(n\) days prior to this. |
family | A string representing the family of the sampling distribution. Can be "poisson", "neg_binom", "quasi_poisson", "normal" or "log_normal". |
link | A string representing the link function used to transform the linear predictor. Can be one of |
center | If |
prior | Same as in |
prior_intercept | Same as in |
prior_aux | The prior distribution for the auxiliary parameter, if it exists.
Only used if family is "neg_binom" (reciprocal dispersion), "quasi_poisson" (dispersion), "normal" (standard deviation) or "log_normal" (sigma parameter). Can be a call to |
... | Additional arguments for |
An object of class epiobs
.
Each observational model is given by a call to epiobs
.
In particular, this must define the model for ascertainment rates and the time distribution from infection to observation.
epiobs
has a formula
argument. The left hand side must define the observation vector to be modeled, while the right hand side defines a linear predictor for the ascertainment rate.
The argument i2o
plays a similar role to the gen
argument in epiinf
, however it instead defines the probability mass function for the time between infection and observation.
data(EuropeCovid) # constant ascertainment rate (intercept model) # link ensures ascertainment is between 0 and 2% deaths <- epiobs( deaths ~ 1, i2o = EuropeCovid$inf2death, link = scaled_logit(0.02) )