
Confidence interval for a mean serial interval
Source:R/outbreak-serial-ci.R
epi_serial_interval_ci.RdComputes the sample mean and an ordinary Student t confidence interval for paired onset-date differences, in days. Intervals can be negative. The method assumes independent transmission pairs and approximate normality of the sample mean; it does not account for right truncation, interval censoring, epidemic-phase bias, uncertainty in transmission links, or repeated infectors. These limitations can be severe during an ongoing outbreak.
Value
A one-row tibble with number of pairs, mean and sample standard deviation in days, confidence limits, and confidence level.
Examples
d <- data.frame(a = as.Date("2024-01-01") + 0:3, b = as.Date("2024-01-01") + c(2, 4, 5, 7))
epi_serial_interval_ci(d, a, b)
#> # A tibble: 1 × 6
#> n mean_days sd_days conf_low conf_high conf_level
#> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 4 3 0.816 1.70 4.30 0.95