Given a vector of infection probabilities and potential infection times, simulates infections for each element of ages (ie. each element is an individual age. Only adds infections for alive individuals)
simulate_infection_histories( p_inf, strain_isolation_times, sampling_times, DOBs )
p_inf | a vector of attack rates (infection probabilities) for each year |
---|---|
strain_isolation_times | the vector of possible infection times |
sampling_times | vector of potential sampling times |
DOBs | a vector of ages for each individual |
a list with a matrix of infection histories for each individual in ages and the true attack rate for each epoch
Other simulation_functions:
simulate_attack_rates()
,
simulate_data()
,
simulate_group()
,
simulate_individual_faster()
,
simulate_individual()