For each individual and MCMC iteration, uses the infection history MCMC chain and detects runs of consecutive infections.

identify_run_lengths(inf_chain)

Arguments

inf_chain

data table of the infection histories posterior

Value

a tibble giving the consecutive infection run length, the start and end time of each run, which index the run is (i.e., which distinct infection), and the time from the end of the previous run, for each `i` and `samp_no`

Examples

if (FALSE) { # \dontrun{
identify_run_lengths(inf_chain)
} # }