Description Usage Arguments Value

View source: R/data_processing.R

Does basic checks for reported data and delay distribution, front pads, and makes AR extrapolation.

1 2 3 4 5 6 7 8 9 10 | ```
data_processing(
reported,
delay_dist,
num_ar_steps = 10,
num_ar_samps = 100,
seed = 1,
linear_tail = 14,
front_pad_size = 10,
extrapolation_prior_precision = 2
)
``` |

`reported` |
An integer vector of reported cases. |

`delay_dist` |
A positive vector that sums to one, which describes the delay distribution. |

`num_ar_steps` |
An integer number of AR steps after last observation. |

`num_ar_samps` |
An integer number of AR samples. |

`seed` |
Seed for RNG. |

`linear_tail` |
An integer number of days used to fit linear model on tail to be used as a mean for AR extrapolation. |

`front_pad_size` |
An integer for initial number of 0's before first observation. |

`extrapolation_prior_precision` |
A positive scalar for extrapolation slope shrinkage prior precision. |

A list with elements:

extrap = a matrix of size (num_ar_samps x n + num_ar_steps + front_pad_size)

original = a vector of logicals for whether in original time series range

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.