generateRt.Rd
Generate an R_t timeseries simulation based on a small set of fixed time points.
generateRt( name, dateAtTime0 = "2020-01-01", length = 365, breaks = sort(c(0, sample(0:364, 5))), R_t = alternatingRandom(fn = rlnorm), smooth = TRUE, sawtooth = FALSE, Gt.mean = 5, Gt.sd = 4, ... )
name | - a meaningful name for this growth rate scenario |
---|---|
dateAtTime0 | - the date at time zero |
length | - how many days in the scenario |
breaks | - time points (between 0 and length) when the growth rate is at a set value. |
R_t | - the values of the reproduction at the time points up to and including the break points, optionally an additional point for the period to the end of the time-series |
smooth | - should the rates be interpolated with a spline. If so it may be a good ideal to specify the growth rate at zero. |
sawtooth | - if the rates are not smooth should they be a step function or a saw-tooth linear function. |
Gt.mean | - mean of the generation time for conversion to R_t |
Gt.sd | - sd of the generation time for conversion to R_t |
... | - ignored |
- a list containing name - the scenario name, ts - a tibble with the date, generated growth rate and R_t values, events - the time-points of the period, infectivityProfile - an infectivity_profile