Description Usage Arguments Value Examples
Export the output of fit_incidence
to a data frame with an optional
addition of a time index.
1 | incidence_to_df(x, times = NULL, low_quantile = 0.05, high_quantile = 0.95)
|
x |
An "incidence_spline_model" output from |
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. |
A data frame with the following entries:
Time – a time index; if 'ts' is 'NULL' it is the observation number;
Reported – the value of 'reported';
Ihat – MAP incidence curve estimate;
Chat – expected cases given MAP incidence curve estimate;
LowCI – lower pointwise credible interval bands around the incidence curve; and
HighCI – higher pointwise credible interval bands around the incidence curve.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.