Finds the total number of infections for each iteration of an MCMC chain

get_total_number_infections(inf_chain, pad_chain = TRUE)

Arguments

inf_chain

the data table with infection history samples from serosolver

pad_chain

if TRUE, pads the infection history MCMC chain to have entries for non-infection events

Value

a data table

Examples

if (FALSE) { inf_chain <- load_infection_chains(thin=10,burnin=5000,chain_subset=1:3) n_infs <- get_total_number_infections(inf_chain$chain, pad_chain=FALSE) }