Skip to contents

This function estimates the reproduction number (`R_est`) and an associated coefficient (`R_coeff_tmp`) based on epidemic ata.

Usage

R_estim(episimdata, Ygen, ii, R_est_wind = 5, r_dir = 0)

Arguments

episimdata

A data frame containing epidemic simulation data with columns `C`, `Lambda_C`, and `R_coeff` containing, cases, total infectiousness (computed form cases), and the reduction in R by policy, respectively.

Ygen

A numeric vector representing the generation time distribution.

ii

An integer specifying the current time step in the simulation.

R_est_wind

An integer (default = 5) defining the window size for R estimation.

r_dir

An integer specifying the reproduction number adjustments.

Value

A list containing: - `R_est`: Estimated reproduction number. - `R_coeff_tmp`: Estimated reduction coefficient for `R0`.