R_t: Effective Reproduction Number for Epidemic Data

R_tR Documentation

Effective Reproduction Number for Epidemic Data

Description

Calculation of the effective reproduction number for infection/surveillance data

Usage

R_t(
  infections, 
  GP = 4,
  correction = FALSE
  )

Arguments

infections

numeric vector with infection data

GP

Generation period, in days

correction

Correction of values equal to zero? (Recommended)

Details

The function calculates the effective reproduction number (=growth factor), R_t, of an infections time series.

Value

list with two entries:

R_t:

Object of class "numeric" R_t values

infections_data:

Object of class "data.frame" Dataset with infections data and R_t

Author(s)

Thomas Wieland

References

Bonifazi G et al. (2021) A simplified estimate of the effective reproduction number Rt using its relation with the doubling time and application to Italian COVID-19 data. The European Physical Journal Plus 136, 386. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1140/epjp/s13360-021-01339-6")}

Wieland T (2020) A phenomenological approach to assessing the effectiveness of COVID-19 related nonpharmaceutical interventions in Germany. Safety Science 131, 104924. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1016/j.ssci.2020.104924")}

See Also

logistic_growth

Examples

data(COVID19Cases_geoRegion)
# Get SWISS COVID19 cases at NUTS 3 level

COVID19Cases_geoRegion <- 
  COVID19Cases_geoRegion[!COVID19Cases_geoRegion$geoRegion %in% c("CH", "CHFL"),]
# Exclude CH = Switzerland total and CHFL = Switzerland and Liechtenstein total

COVID19Cases_geoRegion <- 
  COVID19Cases_geoRegion[COVID19Cases_geoRegion$datum <= "2020-05-31",]
# Extract first COVID-19 wave

COVID19Cases_BS <-
  COVID19Cases_geoRegion[(COVID19Cases_geoRegion$geoRegion == "ZH")
                         & (COVID19Cases_geoRegion$sumTotal > 0),]
# COVID cases for Zurich

Rt_BS <- R_t(infections = COVID19Cases_BS$entries)
# Effective reproduction number

Rt_BS

swash documentation built on June 8, 2025, 1:25 p.m.