get_Ri {o2ools} | R Documentation |
Compute case reproduction numbers (Ri) from outbreaker2 chains
Description
This function computes the number of secondary infections caused by each individual from outbreaker2 MCMC chains. For each MCMC iteration, it counts how many times each individual appears as an infector (alpha parameter).
Usage
get_Ri(out)
Arguments
out |
An object of class |
Value
A data frame where:
Each row represents an MCMC iteration
Each column represents an individual (named by their identifier)
Values represent the reproduction number (Ri) for that individual in that iteration
Examples
out_id <- identify(out, ids = linelist$name)
Ri <- get_Ri(out_id)
str(Ri)
[Package o2ools version 0.0.1 Index]