The function estimateRt
estimates the time-level effective reproductive number
from individual-level reproductive numbers.
estimateRt(riData, dateVar, timeFrame = c("days", "weeks", "months", "years"))
The name of the dateset with individual-level reproductive numbers.
The variable name (in quotes) of the dates that the individuals are observed
(data frame riData
must have a variable called <dateVar>
).
The time frame used to calculate Rt
(one of "days", "months", "weeks", "years"
).
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.
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.