Back- calculate R(t) from incident infections and the generation interval
Source:R/model_component_fwd_sim.R
calc_rt.Rd
Note that the forward renewal process is not a simple convolution of incident infections and the generation interval – because it assumes that the generation interval being passed in is indexed starting at day 1, and that on any particular index day there is no contribution from individuals infected on that day. This is a reasonable assumption, but to align the implementation of the forward process with our backward process, we have to add a 0 density to day 0 of the passed in generation interval.
Arguments
- new_i
vector of numerics that spans the length of
tot_time
, representing the new incident infections per day- convolve_fxn
function used to convolve infections with delay pmf This will typically take the
convolve_dot_product()
function from thewwinference.stan
model- generation_interval
vector of simplex describing the probability of each time from infection to onwards transmission
- uot
integer indicating the days for exponential growth initialization to occur (referred to as unobserved time)
- tot_time
integer indicating the total time we have incident infections for