S3 generic for computing growth rates from fitted models
Usage
growth_rate(fitted_model, ...)
# S3 method for class 'ps'
growth_rate(fitted_model, ...)
# S3 method for class 'rw'
growth_rate(fitted_model, ...)
# S3 method for class 'ps_single'
growth_rate(fitted_model, ...)
# S3 method for class 'rw_single'
growth_rate(fitted_model, ...)
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)
gr <- growth_rate(fit)
} # }