Description Usage Arguments Details Value Examples
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.
1 2 3 4 5 6 7 8 9 10 11 |
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 nth 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 |
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.
An object of class epiobs
.
1 2 3 4 5 6 7 8 | 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)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.