get_si | R Documentation |
The serial interval is the time between the onset of symptoms in an infector-infectee pair. This function computes the serial interval statistics from a list of transmission trees.
get_si(
trees,
date_suffix = "date",
stats = list(mean = mean, lwr = function(x) quantile(x, 0.025, na.rm = TRUE), upr =
function(x) quantile(x, 0.975, na.rm = TRUE))
)
trees |
A list of data frames, generated by |
date_suffix |
A string indicating the suffix for date of onset columns.
Default is "date", which means the columns should be named |
stats |
A list of functions to compute statistics. Default is:
Each function should take a numeric vector as input and return a single numeric value. |
A data frame with serial interval statistic
get_trees
for generating a list of transmission trees.
trees <- get_trees(out, date = linelist$onset)
si_stats <- get_si(trees)
str(si_stats)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.