S3 generic for computing incidence from fitted models
Usage
incidence(fitted_model, dow, ...)
# S3 method for class 'ps'
incidence(fitted_model, dow, ...)
# S3 method for class 'rw'
incidence(fitted_model, dow, ...)
# S3 method for class 'ps_single'
incidence(fitted_model, dow, ...)
# S3 method for class 'rw_single'
incidence(fitted_model, dow, ...)
Value
named list of class `EpiStrainDynamics.metric` containing a dataframe of the calculated metric outcome (`$measure`), the fit object (`$fit`), and the constructed model object (`$constructed_model`). The `measure` data frame contains the median of the epidemiological quantity (`y`), the 50 interval of the quantity (`lb_50` & `ub_50`), the 95 (`lb_95` & `ub_95`), the proportion greater than a defined threshold value (`prop`), the pathogen name (`pathogen`), and the time label (`time`).
Examples
if (FALSE) { # \dontrun{
mod <- construct_model(
method = random_walk(),
pathogen_structure = single(
case_timeseries = sarscov2$cases,
time = sarscov2$date))
fit <- fit_model(mod)
inc <- incidence(fit, dow = TRUE)
} # }