interpolate_rt: Produce piecewise linear Rt

Description Usage Arguments Value

View source: R/utils_parameters.R

Description

Make a piecewise linear interpolating vector of Rt, for each day within the simulated interval. The assumed start of simulation is the first date provided in dates, and the end of simulation is the last date of dates unless max_date is provided. Interpolation is done with inclusive endpoints.

Usage

1
interpolate_rt(dates, rt, max_date = NULL)

Arguments

dates

a vector of Dates

rt

a vector of reproductive values at those dates

max_date

the maximum date of simulation (optional)

Value

a list with named elements Rt and Rt_tt, which can be provided to the safir::get_parameters function's arguments R0 and tt_R0.


mrc-ide/safir2 documentation built on Jan. 14, 2022, 9:37 p.m.