The function estimateRt estimates the time-level effective reproductive number from individual-level reproductive numbers.

estimateRt(riData, dateVar, timeFrame = c("days", "weeks", "months", "years"))

Arguments

riData

The name of the dateset with individual-level reproductive numbers.

dateVar

The variable name (in quotes) of the dates that the individuals are observed (data frame riData must have a variable called <dateVar>).

timeFrame

The time frame used to calculate Rt (one of "days", "months", "weeks", "years").

Value

A data frame with the time-level reproductive numbers. Column names:

  • time - the time frame corresponding to the reproductive number estimate (day for "days" and "weeks", month for "months", year for "years").

  • timeRank - the rank of the time frame.

  • Rt - the time-level reproductive number for this time frame.

Details

This function is meant to be called by estimateR which estimates the individual-level and time-level, and average reproductive numbers, but it can also be run directly.