R/simulate_general_outbreaks.R
general_generation_infection.Rd
Infect the current generation given the previous generation
general_generation_infection( cluster_id, df, covariate_weights = NULL, gen, prev_gen, cluster_size, max_size )
cluster_id | unique cluster ID |
---|---|
df | covariate data frame. One is prob_inf |
covariate_weights | either NULL or weight of covariates |
gen | new generation number |
prev_gen | data frame with at least smear status (0/1) and person_id |
cluster_size | size of previous cluster |
max_size | maximum size of cluster |
list with the following entries
new cluster size with the current generation
data frame of current generation (new infections)
number of infections for each person in the previous generation