R/autocor.R
rw.RdA call to rw can be used in the 'formula' argument of epim, allowing
random walks for the reproduction number. Does not evaluate arguments. Simply creates a
list with the information needed for the stan data to be parsed correctly.
rw(time, gr, prior_scale = 0.2)
| time | An optional name defining the random walk time periods for each
date and group. This must be a column name found in the |
|---|---|
| gr | Same as for |
| prior_scale | The steps of the walks are independent zero mean normal with an unknown scale hyperparameter. This scale is given
a half-normal prior. |
A list to be parsed internally.
data("EuropeCovid") args <- EuropeCovid args$formula <- R(country, date) ~ 1 + rw(gr=country) + lockdown