incidence_to_df: Export incidence model to data frame

Description Usage Arguments Value Examples

View source: R/main.R

Description

Export the output of fit_incidence to a data frame with an optional addition of a time index.

Usage

1
incidence_to_df(x, times = NULL, low_quantile = 0.05, high_quantile = 0.95)

Arguments

x

An "incidence_spline_model" output from fit_incidence.

times

An optional vector of time indices.

low_quantile

A scalar that specifies the low quantile value for the output CI.

high_quantile

A scalar that specifies the high quantile value for the output CI.

Value

A data frame with the following entries:

Examples

1
2
3
4
indiana_model <- fit_incidence(
                  reported = spanish_flu$Indiana, 
                  delay_dist = spanish_flu_delay_dist$proportion)
 indiana_df <- incidence_to_df(indiana_model, times = spanish_flu$Date)

incidental documentation built on Sept. 16, 2020, 5:07 p.m.