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).
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)
#> 'data.frame': 201 obs. of 30 variables:
#> $ Natashia : int 1 1 1 1 1 1 1 1 1 1 ...
#> $ Yesenia : int 1 1 1 1 1 1 1 1 1 1 ...
#> $ Abdul Kareem: int 1 1 1 1 1 1 1 1 1 1 ...
#> $ Logan : int 8 3 2 3 3 2 2 2 2 2 ...
#> $ Emily : int 5 4 3 2 4 3 3 2 3 3 ...
#> $ Shelby : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Robert : int 0 2 3 2 2 3 3 3 3 3 ...
#> $ Sahla : int 0 1 2 3 1 2 2 3 2 2 ...
#> $ Tuhfa : int 2 3 3 3 3 3 3 3 3 3 ...
#> $ Avenito : int 2 3 3 3 3 3 3 3 3 3 ...
#> $ Cyril : int 2 2 2 2 2 2 2 2 2 2 ...
#> $ Demarco : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Kaitlyn : int 4 4 4 4 4 4 4 4 4 4 ...
#> $ Vanessa : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Dania : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Shendell : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Michael : int 1 1 1 1 1 2 2 2 2 2 ...
#> $ Dominique : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Laaiqa : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Cruzelia : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Zaid : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Micah : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Christian : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Stephanie : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Kavita : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Travis : int 0 1 1 1 1 0 0 0 0 0 ...
#> $ Jacob : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Lianne : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Mariah : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ Rabi : int 0 0 0 0 0 0 0 0 0 0 ...