incidence_to_df {incidental}R Documentation

Export incidence model to data frame

Description

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

Usage

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


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)


[Package incidental version 0.1 Index]