powered by
Calculates the within-group transmission proportion 'pi' for each group in the data.
get_pi(from, to, alpha = 0.05)
A data frame with the group names and the corresponding 'pi' values and confidence intervals.
A vector of infectors.
A vector of infectees.
The significance level for the confidence intervals.
from <- c("A", "A", "NA", "C", "C", "C") to <- c("A", "B", "B", "C", "C", "C") get_pi(from, to, alpha = 0.05)
Run the code above in your browser using DataLab