Skip to content

Epidemic Curves & the Reproduction Number

An epidemic curve counts new cases per day. The reproduction number is the average number of people that one case infects, and the curve alone does not give it, because the same growth fits a fast infection with few secondary cases or a slow one with many. This page estimates the early growth rate of one outbreak, converts it to a reproduction number with an assumed serial interval, follows the reproduction number through an intervention with the method of Cori and colleagues, and shows how a reporting delay produces a decline that did not happen.

Download outbreak_cases.csv into your working directory. The invented table has 70 rows, one per day, and three columns: day, cases (new cases by day of symptom onset) and true_r. The day is the unit of analysis.

The counts come from a renewal process with known answers. Four imported cases arrive on day 1. On every later day, the expected number of new cases is the reproduction number of that day times the past cases, each weighted by the probability that the serial interval equals its age in days. The serial interval is the time from symptom onset in a case to symptom onset in a person whom that case infects. Here it is the daily distribution that discr_si() of EpiEstim builds from a gamma distribution with a mean of 5 days and a standard deviation of 2.5 days. The function shifts the gamma by one day and makes it discrete by interpolation between whole days, which keeps the mean at 5 days and gives a standard deviation of about 2.53 days. The reproduction number is 1.8 through day 29. An intervention starts on day 30 and holds it at 0.7. The column true_r is the answer key. Real surveillance data never has it, and the code reads it only to judge the estimates.

Read the table, print its totals, and plot the daily counts with the first day of the intervention marked.

library(EpiEstim)
library(ggplot2)
outbreak <- read.csv("outbreak_cases.csv")
dir.create("outputs", showWarnings = FALSE)
intervention_day <- 30
n_days <- nrow(outbreak)
week <- (outbreak$day - 1) %/% 7 + 1
cat(sprintf("%d days, %d cases, largest count %d on day %d\n", n_days,
sum(outbreak$cases), max(outbreak$cases),
which.max(outbreak$cases)))
cat("Cases on days 1 to 14:", outbreak$cases[1:14], "\n")
cat("Cases by week:", tapply(outbreak$cases, week, sum), "\n")
curve_plot <- ggplot(outbreak, aes(day, cases)) +
geom_col(fill = "#4c72b0", width = 0.9) +
geom_vline(xintercept = intervention_day - 0.5, linetype = "dashed") +
annotate("text", x = intervention_day + 0.5, y = max(outbreak$cases),
label = "Intervention, day 30", hjust = 0, size = 3.5) +
labs(x = "Day of symptom onset", y = "Cases per day") +
theme_classic(base_size = 12)
ggsave("outputs/epidemic-curve-r.png", curve_plot, width = 7, height = 3.5,
dpi = 150)
70 days, 752 cases, largest count 45 on day 29
Cases on days 1 to 14: 4 0 1 0 1 2 5 2 6 5 3 3 6 7
Cases by week: 13 32 80 179 176 94 69 59 33 17

Epidemic curve drawn with ggplot2. Daily cases rise from a handful in the first week to 45 on day 29. A dashed line marks the intervention before day 30, and the bars fall from there to a few cases per day by day 70.

The outbreak has 752 cases. The weekly totals climb from 13 to 179 in four weeks, stay at 176 in week 5, and fall to 17 by week 10. The largest daily count, 45, falls on day 29, the last day before the intervention. Days 2 and 4 have no case.

The curve shows when cases rose, when they turned, and how many there were. It does not show the reproduction number, since the same doubling time fits a short serial interval with few secondary cases per case or a long one with many. It does not show why cases fell either. Here the turn falls on the intervention day because the simulation changes the reproduction number on that day. In real data dated by symptom onset, people who were infected before an intervention keep falling ill for one incubation period after it, so the turn comes later than its cause. A turn can also come from people who changed their behavior before any order, from a shrinking pool of susceptible people, or from recent cases that are not reported yet. One curve with no comparison cannot separate these. The study designs page defines incidence and the other measures of occurrence.

While the reproduction number is constant and almost everyone is susceptible, cases grow exponentially. The expected count on day t is exp(a + r × t), and r is the growth rate per day. A Poisson regression with a log link has this mean, so its slope estimates r, and a day with zero cases is an ordinary observation in that model. The count regression page covers the model itself. The doubling time is log(2) / r.

Every window starts on day 2. Day 1 holds the four imported cases. They did not come from local transmission, and they sit far above the exponential curve that the later days follow, so a window that includes day 1 describes the importation as much as the growth. The code fits four windows. The first covers the whole period before the intervention, two more cover parts of it, and the last runs one week past the intervention.

#' Fit a Poisson regression of daily cases on day within a window.
#'
#' @param data A data frame with the columns day and cases.
#' @param first_day,last_day The first and the last day of the window.
#' @return A one-row data frame with the cases in the window, the growth
#' rate per day with 95% Wald limits, and the doubling time in days.
GrowthRate <- function(data, first_day, last_day) {
window <- data[data$day >= first_day & data$day <= last_day, ]
fit <- glm(cases ~ day, family = poisson, data = window)
limits <- confint.default(fit)["day", ]
rate <- coef(fit)[["day"]]
data.frame(first_day = first_day, last_day = last_day,
cases = sum(window$cases), rate = rate, lower = limits[[1]],
upper = limits[[2]], doubling_days = log(2) / rate)
}
first_days <- c(2, 2, 15, 2)
last_days <- c(29, 14, 29, 36)
growth <- do.call(rbind, Map(GrowthRate, list(outbreak), first_days,
last_days))
print(round(growth, 3), row.names = FALSE)
main <- growth[1, ]
cat(sprintf("Days 2 to 29: doubling time %.1f days, 95%% CI [%.1f, %.1f]\n",
main$doubling_days, log(2) / main$upper, log(2) / main$lower))
first_day last_day cases rate lower upper doubling_days
2 29 345 0.128 0.111 0.145 5.410
2 14 41 0.173 0.081 0.266 3.995
15 29 304 0.120 0.092 0.148 5.763
2 36 491 0.071 0.061 0.081 9.804
Days 2 to 29: doubling time 5.4 days, 95% CI [4.8, 6.2]

Over days 2 to 29 the growth rate is 0.128 per day, with a 95% interval from 0.111 to 0.145. Cases double every 5.4 days, with an interval from 4.8 to 6.2 days.

The window changes the answer. Days 15 to 29 give 0.120, with a wider interval than the full window. Days 2 to 14 hold 41 cases and give 0.173, with an interval from 0.081 to 0.266, which is a doubling time anywhere between 2.6 and 8.6 days.

The fourth row shows what a badly chosen window does. It runs through day 36 and returns 0.071, a doubling time of 9.8 days, with the narrowest interval in the table: 0.061 to 0.081. No part of this outbreak grew at that rate. The window mixes 28 days of growth with 7 days of decline, and its interval is narrow because the window holds 491 cases. Choose the window before you fit, and end it before any known change in transmission.

The growth rate says how fast cases multiply per day. The reproduction number says how much they multiply per generation. The serial interval distribution connects the two, because it sets how long a generation takes. For a renewal process that grows at rate r, 1 / R equals the sum, over all lags, of the weight of the lag times exp(−r × lag). Wallinga and Lipsitch showed how the interval distribution fixes this relation. For a gamma distribution with mean m and standard deviation s, the sum has a closed form:

R = (1 + r * s^2 / m) ^ (m^2 / s^2)

The relation is stated for the generation interval, the time between two successive infections. Infection times are rarely observed, so analyses use the serial interval between symptom onsets in its place. In this simulation the two are the same distribution. The code checks the formula against a known answer first. It runs the renewal process without noise at a reproduction number of 1.8, with the daily weights of the simulation, and reads the growth rate at the end. Then it applies the formula to the estimate from days 2 to 29 with three assumed serial interval means, with the standard deviation at half the mean. Last, it draws outbreaks from the same renewal process until 1,000 of them reach 100 cases by day 29, as this one did, and fits the Poisson regression to each. On days 2 to 14 it also fits the common alternative, a straight line through the logarithm of the counts, which cannot use a day with no case because the logarithm of zero does not exist.

#' Compute the reproduction number that a growth rate implies.
#'
#' @param rate Growth rate per day.
#' @param mean_si,sd_si Mean and standard deviation in days of the gamma
#' generation interval.
#' @return The reproduction number.
GammaReproductionNumber <- function(rate, mean_si, sd_si) {
(1 + rate * sd_si^2 / mean_si)^(mean_si^2 / sd_si^2)
}
#' Compute the daily cases of a renewal process.
#'
#' @param reproduction_number One reproduction number for all days.
#' @param weights Serial interval probabilities of the lags 0, 1, 2, ...
#' @param n_days Number of days.
#' @param imported Imported cases on day 1.
#' @param noise TRUE draws Poisson counts. FALSE returns expected cases.
#' @return A vector of daily cases.
RenewalCases <- function(reproduction_number, weights, n_days, imported,
noise = FALSE) {
cases <- numeric(n_days)
cases[1] <- imported
for (day in 2:n_days) {
cases[day] <- reproduction_number *
sum(cases[(day - 1):1] * weights[2:day])
if (noise) {
cases[day] <- rpois(1, cases[day])
}
}
cases
}
mean_si <- 5
sd_si <- 2.5
lags <- 0:(n_days - 1)
weights <- discr_si(lags, mean_si, sd_si)
cat(sprintf("Discrete serial interval: mean %.3f, SD %.3f days\n",
sum(lags * weights),
sqrt(sum(lags^2 * weights) - sum(lags * weights)^2)))
noiseless <- RenewalCases(1.8, weights, n_days, 4)
true_rate <- log(noiseless[n_days] / noiseless[n_days - 1])
cat(sprintf("Growth rate of the noiseless process %.4f, doubling %.2f days\n",
true_rate, log(2) / true_rate))
cat(sprintf("At that rate: gamma formula %.3f, discrete sum %.3f\n",
GammaReproductionNumber(true_rate, mean_si, sd_si),
1 / sum(weights * exp(-true_rate * lags))))
for (last_day in c(14, 29)) {
expected <- data.frame(day = 2:last_day, cases = noiseless[2:last_day])
cat(sprintf("Poisson slope of its expected counts, days 2 to %d: %.4f\n",
last_day, coef(glm(cases ~ day, family = quasipoisson,
data = expected))[["day"]]))
}
for (assumed_mean in c(3, 5, 7)) {
implied <- GammaReproductionNumber(c(main$rate, main$lower, main$upper),
assumed_mean, assumed_mean / 2)
cat(sprintf("Mean %d days, SD %.1f days: R = %.2f, 95%% CI [%.2f, %.2f]\n",
assumed_mean, assumed_mean / 2, implied[1], implied[2],
implied[3]))
}
set.seed(2026)
simulated <- data.frame()
early_slopes <- data.frame()
while (nrow(simulated) < 1000) {
one <- data.frame(day = 1:29,
cases = RenewalCases(1.8, weights, 29, 4, noise = TRUE))
if (sum(one$cases) >= 100) {
simulated <- rbind(simulated, GrowthRate(one, 2, 29))
early <- one[one$day >= 2 & one$day <= 14 & one$cases > 0, ]
early_slopes <- rbind(early_slopes, data.frame(
poisson = GrowthRate(one, 2, 14)$rate,
log_linear = coef(lm(log(cases) ~ day, data = early))[["day"]]
))
}
}
cat(sprintf("1000 simulated outbreaks: mean rate %.4f, SD %.4f, ",
mean(simulated$rate), sd(simulated$rate)))
cat(sprintf("mean standard error %.4f\n",
mean(simulated$upper - simulated$lower) / (2 * qnorm(0.975))))
cat(sprintf("95%% intervals that contain %.4f: %.0f%%\n", true_rate,
100 * mean(simulated$lower <= true_rate &
simulated$upper >= true_rate)))
cat(sprintf("Days 2 to 14, mean slope: Poisson %.4f, log-linear %.4f\n",
mean(early_slopes$poisson), mean(early_slopes$log_linear)))
Discrete serial interval: mean 5.000, SD 2.533 days
Growth rate of the noiseless process 0.1267, doubling 5.47 days
At that rate: gamma formula 1.801, discrete sum 1.800
Poisson slope of its expected counts, days 2 to 14: 0.1512
Poisson slope of its expected counts, days 2 to 29: 0.1292
Mean 3 days, SD 1.5 days: R = 1.44, 95% CI [1.38, 1.51]
Mean 5 days, SD 2.5 days: R = 1.81, 95% CI [1.68, 1.95]
Mean 7 days, SD 3.5 days: R = 2.25, 95% CI [2.03, 2.47]
1000 simulated outbreaks: mean rate 0.1284, SD 0.0156, mean standard error 0.0104
95% intervals that contain 0.1267: 80%
Days 2 to 14, mean slope: Poisson 0.1514, log-linear 0.1041

The daily serial interval has a mean of 5.000 days and a standard deviation of 2.533 days. Without noise, the process settles at a growth rate of 0.1267 per day, a doubling time of 5.47 days. That is the true growth rate of the process: the rate that it approaches while R stays at 1.8, and the rate that the relation links to R. Put back into the relation, the sum over the daily weights returns 1.800 and the gamma formula returns 1.801. The gap of 0.001 comes from treating daily weights as a continuous gamma distribution. A finite window of expected counts grows at a different rate, because the imported cases start the process away from its steady shape: the Poisson slope of the expected counts is 0.1512 on days 2 to 14 and 0.1292 on days 2 to 29.

With the serial interval of the simulation, the growth rate of 0.128 becomes a reproduction number of 1.81, with an interval from 1.68 to 1.95 that includes the true 1.8. Before day 30 nobody is immune and no control is in place, so this is also the basic reproduction number. Assume a mean of 3 days, and the same growth rate gives 1.44. Assume 7 days, and it gives 2.25. Neither of those intervals includes 1.8. A growth rate alone carries no information about the serial interval, so nothing in this output warns that an assumed mean is wrong. The serial interval comes from pairs of cases with a known infector, which contact tracing collects.

R and Python draw different random numbers, so the simulation lines differ between the tabs. Over days 2 to 29 the estimates average 0.1284 in R and 0.1273 in Python, close to the true 0.1267. They vary with a standard deviation of 0.0156 and 0.0159, while the model reports a standard error of 0.0104 and 0.0105 on average, so the 95% interval contains the true rate in only 80% and 81% of the outbreaks. The Poisson model treats each day as an independent draw around one curve. In an outbreak every case descends from earlier cases, so chance in the first days moves all later days. Read the interval of 0.111 to 0.145, and each R interval computed from it, as about two thirds of the real uncertainty.

Over days 2 to 14 the Poisson slopes average 0.1514 and 0.1527, close to 0.1512, the slope of the expected counts on those days. The log-linear slopes average 0.1041 and 0.1034. The dropped zero days are the days with the fewest cases, at the start of the curve. Without them the left end of the fitted line sits higher, and the line is flatter.

One growth rate assumes one reproduction number for the whole window. The method of Cori and colleagues estimates a reproduction number for each short window instead, and it works on the renewal equation directly:

expected cases on day t = R(t) * sum over lags s of w(s) * cases on day t - s

The sum is the total infectiousness on day t: the past cases, each weighted by the probability that it passes the infection on today. Suppose R is constant within a window and has a gamma prior with shape a and scale b. Its posterior is again a gamma distribution:

shape = a + cases in the window
scale = 1 / (1 / b + total infectiousness in the window)

estimate_R() of EpiEstim computes this posterior. The call states each choice: method = "parametric_si" with the mean and the standard deviation of the serial interval, windows of 7 days that slide by one day, and a prior with mean 5 and standard deviation 5, which is a shape of 1 and a scale of 5. EpiEstim 2.2-5 uses the same windows and the same prior when the configuration leaves them out. The function counts the cases of day 1 as imported: they infect others, and no reproduction number has to account for them. EpiEstim is an R package, so the Python tab computes the same posterior with numpy and scipy, with the same prior and the same rule for day 1.

#' Estimate the reproduction number on sliding windows with EpiEstim.
#'
#' The prior has mean 5 and SD 5. No window ends before day 8.
#'
#' @param cases Daily case counts, starting on day 1.
#' @param window_days Length of the sliding window in days.
#' @param mean_si,sd_si Mean and standard deviation of the serial interval.
#' @return A data frame with one row per window: t_start, t_end, the cases
#' in the window, the posterior mean and the 95% credible limits.
SlidingEstimate <- function(cases, window_days, mean_si, sd_si) {
t_end <- seq(max(window_days + 1, 8), length(cases))
t_start <- t_end - window_days + 1
config <- make_config(list(mean_si = mean_si, std_si = sd_si,
t_start = t_start, t_end = t_end,
mean_prior = 5, std_prior = 5))
fit <- estimate_R(cases, method = "parametric_si", config = config)
cumulative <- cumsum(cases)
data.frame(t_start = t_start, t_end = t_end,
cases = cumulative[t_end] - cumulative[t_start - 1],
mean = fit$R[["Mean(R)"]],
lower = fit$R[["Quantile.0.025(R)"]],
upper = fit$R[["Quantile.0.975(R)"]])
}
estimate <- SlidingEstimate(outbreak$cases, 7, mean_si, sd_si)
estimate$true_r <- outbreak$true_r[estimate$t_end]
shown_days <- c(8, 29, 31, 33, 70)
print(round(estimate[estimate$t_end %in% shown_days, ], 3),
row.names = FALSE)
t_start t_end cases mean lower upper true_r
2 8 11 2.435 1.258 3.994 1.8
23 29 205 1.752 1.521 2.000 1.8
25 31 202 1.365 1.184 1.559 0.7
27 33 204 1.155 1.002 1.318 0.7
64 70 17 0.664 0.394 1.004 0.7

The two tabs agree to the third decimal in each row. cases is the number of cases in the window, mean is the posterior mean, and lower and upper are the 2.5% and 97.5% quantiles of the posterior. The first window, days 2 to 8, holds 11 cases, and its estimate of 2.435 has an interval from 1.258 to 3.994. The window that ends on day 29 holds 205 cases and gives 1.752, with an interval from 1.521 to 2.000. Both include the true 1.8.

The next block measures when the estimate crosses 1 and how wide its interval is early and late. It repeats the crossing for windows of 3 and 14 days and draws the estimate against the truth.

after <- estimate[estimate$t_end >= intervention_day, ]
cat(sprintf("Mean below 1 from the window that ends on day %d\n",
min(after$t_end[after$mean < 1])))
cat(sprintf("Upper limit below 1 from the window that ends on day %d\n",
min(after$t_end[after$upper < 1])))
estimate$width <- estimate$upper - estimate$lower
for (day in c(8, 14, 29, 70)) {
row <- estimate[estimate$t_end == day, ]
cat(sprintf("Window to day %2d: %3d cases, interval width %.2f\n", day,
row$cases, row$width))
}
for (window_days in c(3, 7, 14)) {
other <- SlidingEstimate(outbreak$cases, window_days, mean_si, sd_si)
crossing <- min(other$t_end[other$t_end >= intervention_day &
other$mean < 1])
on_day_29 <- other[other$t_end == 29, ]
cat(sprintf("%2d-day window: mean below 1 from day %d, ", window_days,
crossing))
cat(sprintf("width on day 29 %.2f\n", on_day_29$upper - on_day_29$lower))
}
estimate_plot <- ggplot(estimate, aes(t_end)) +
geom_hline(yintercept = 1, color = "gray60") +
geom_vline(xintercept = intervention_day - 0.5, linetype = "dashed") +
geom_ribbon(aes(ymin = lower, ymax = upper), fill = "#4c72b0",
alpha = 0.3) +
geom_line(aes(y = mean), color = "#4c72b0", linewidth = 0.8) +
geom_step(aes(y = true_r), color = "#c44e52", linewidth = 0.8) +
labs(x = "Last day of the 7-day window", y = "Reproduction number") +
theme_classic(base_size = 12)
ggsave("outputs/reproduction-number-r.png", estimate_plot, width = 7,
height = 3.5, dpi = 150)
Mean below 1 from the window that ends on day 35
Upper limit below 1 from the window that ends on day 36
Window to day 8: 11 cases, interval width 2.74
Window to day 14: 32 cases, interval width 1.26
Window to day 29: 205 cases, interval width 0.48
Window to day 70: 17 cases, interval width 0.61
3-day window: mean below 1 from day 32, width on day 29 0.67
7-day window: mean below 1 from day 35, width on day 29 0.48
14-day window: mean below 1 from day 39, width on day 29 0.40

Line plot drawn with ggplot2. The posterior mean of the reproduction number, with a shaded 95% credible interval, is plotted against the last day of each 7-day window. A red step line shows the true value, 1.8 before day 30 and 0.7 after. The interval is wide in the first two weeks, narrows around 1.8, slides down over about six days after the intervention, and then moves around 0.7.

Start with the intervention. The window that ends on day 31 holds five days at 1.8 and two days at 0.7, and it reports 1.365. The window that ends on day 33, the fourth day at 0.7, reports 1.155 with an interval from 1.002 to 1.318, which still excludes 1 from above. The posterior mean falls below 1 with the window that ends on day 35. The upper limit follows on day 36, the first window with all seven days after the intervention. In the figure, the blue band crosses the red step as a ramp over these days. The ramp comes from the window, because the true value changed in one day.

The window length sets that delay. A 3-day window crosses 1 on day 32, and a 14-day window on day 39. The short window pays in noise: on day 29 its interval is 0.67 wide, against 0.48 for 7 days and 0.40 for 14.

The first days are unstable for a different reason. The window to day 8 holds 11 cases, and its interval is 2.74 wide. The width falls to 1.26 by day 14 and to 0.48 by day 29. The prior also shows in the early numbers, because a shape of 1 weighs as much as one case. That matters next to 11 cases and not next to 205. In the R run, EpiEstim warns “You’re estimating R too early in the epidemic to get the desired posterior CV” for the 3-day windows. Their first window, days 6 to 8, holds 9 cases, and EpiEstim asks for 11, the count at which the posterior coefficient of variation reaches its default target of 0.3. Small counts return at the end of the outbreak: the window to day 70 holds 17 cases, and its interval is 0.61 wide.

A case enters the database some days after its symptom onset, so on any day the most recent onset days are incomplete. Suppose the analysis runs on day 29, while the reproduction number is still 1.8, and the delay from onset to report follows a gamma distribution with a mean of 4 days and a standard deviation of 2 days. The code multiplies each daily count by the share of cases that the delay distribution lets through by the end of day 29, and rounds to a whole number. That is the expected snapshot, so both tabs print the same table.

snapshot_day <- 29
snapshot <- outbreak[outbreak$day <= snapshot_day, ]
# The delay from onset to report is gamma, mean 4 days and SD 2 days.
snapshot$share <- pgamma(snapshot_day - snapshot$day + 1, shape = 4,
rate = 1)
snapshot$reported <- floor(snapshot$cases * snapshot$share + 0.5)
complete <- SlidingEstimate(snapshot$cases, 7, mean_si, sd_si)
partial <- SlidingEstimate(snapshot$reported, 7, mean_si, sd_si)
comparison <- cbind(
snapshot[snapshot$day >= 22, c("day", "cases", "share", "reported")],
r_complete = complete$mean[complete$t_end >= 22],
partial[partial$t_end >= 22, c("mean", "lower", "upper")]
)
names(comparison)[6] <- "r_reported"
print(round(comparison, 2), row.names = FALSE)
snapshot$cases <- snapshot$reported
late_growth <- GrowthRate(snapshot, 15, 29)
cat(sprintf("Growth rate, days 15 to 29, reported cases: %.3f [%.3f, %.3f]\n",
late_growth$rate, late_growth$lower, late_growth$upper))
day cases share reported r_complete r_reported lower upper
22 19 0.96 18 1.78 1.76 1.41 2.15
23 16 0.92 15 1.74 1.70 1.38 2.06
24 27 0.85 23 1.82 1.73 1.42 2.06
25 20 0.73 15 1.73 1.59 1.32 1.90
26 29 0.57 16 1.74 1.48 1.22 1.75
27 37 0.35 13 1.78 1.31 1.08 1.56
28 31 0.14 4 1.73 1.08 0.88 1.30
29 45 0.02 1 1.75 0.85 0.68 1.04
Growth rate, days 15 to 29, reported cases: -0.005 [-0.039, 0.028]

Of the 45 cases with onset on day 29, 2% are in the database, which is 1 case. Day 26 shows 16 of its 29 cases. The estimate from the reported counts stays close to the complete one through day 23 and then slides: 1.59 on day 25, 1.31 on day 27 and 0.85 on day 29, with an interval from 0.68 to 1.04. The complete data give 1.75 for that window, and the true value is 1.8. The growth rate of days 15 to 29 comes out at −0.005 per day in place of 0.120.

An analyst who trusts the last week reports on day 29 that the outbreak has stopped growing, on the day that ends up with the most cases of the whole outbreak. A real analysis corrects for this with nowcasting. It estimates the delay distribution from the report dates of earlier cases, scales each recent count up by the share that has arrived, and carries the uncertainty of that correction into the estimate. The fallback is to stop the series at the last day that is almost complete, which is day 22 here, with 96% reported.

Do not quote a reproduction number without its serial interval. The growth rate of 0.128 per day became 1.44, 1.81 or 2.25 with an assumed mean of 3, 5 or 7 days, and only the middle interval included the true 1.8. State the mean, the standard deviation and the source of the serial interval beside the estimate.

Do not read the last days of a curve that is still filling in. With a mean reporting delay of 4 days, the estimate for day 29 fell from 1.75 to 0.85, and the growth rate fell from 0.120 to −0.005, while transmission had not changed.

Do not estimate a growth rate from a straight line through the logarithm of the counts after the zero days are dropped. On days 2 to 14 of the simulated outbreaks that fit averaged 0.103 to 0.104 per day, and the Poisson regression averaged 0.151 to 0.153. The Poisson model keeps the zero days.

Do not read the Poisson interval of a growth rate as the full uncertainty. In the simulation the 95% interval contained the true rate in 80% and 81% of the outbreaks.

Do not read a windowed estimate as the reproduction number of its last day. The 7-day estimate stayed above 1 through day 34, the fifth day on which the true value was 0.7.

Do not treat the reproduction number as a constant of the pathogen. In this outbreak the same infection had a reproduction number of 1.8 on day 29 and 0.7 on day 30. The number describes transmission in one population at one time, and it moves with contact rates, with control measures and with immunity. The SIR and SEIR page shows how it falls as susceptible people run out.

The EpiEstim package by Cori estimates time-varying reproduction numbers from epidemic curves, with the method and the software that Cori and colleagues, 2013 describe.

Wallinga and Lipsitch, 2007 show that the equations that link the epidemic growth rate to the reproductive number differ only in the generation interval distribution that they assume.

Gostic and colleagues, 2020 summarize the practical challenges of estimating the effective reproductive number, illustrate them with synthetic data, and make recommendations. Read it before you apply the method of this page to real surveillance data.

The EpiEstim reference for estimate_R() lists the five methods for the serial interval, including the ones that carry its uncertainty into the estimate. The reference for make_config() documents the windows, the prior and the posterior coefficient of variation behind the warning on this page.

The count regression page covers the Poisson model, the dispersion check and the negative binomial model for counts. The SIR and SEIR page builds the mechanistic model behind the reproduction number and fits it to case counts.