R/simulate_general_outbreaks.R
simulate_general_outbreak_inner.Rd
Generate a single cluster of infections
simulate_general_outbreak_inner( cluster_id, sample_covariates_df, covariate_weights = NULL, max_size = 50 )
cluster_id | ID of cluster |
---|---|
sample_covariates_df | data frame of covariates with pre-calculated probability of infection |
covariate_weights | default is NULL which draws uniformly at random with replacement from the sample_covariates_df. Otherwise, the weights are used. |
max_size | maximum size of cluster |
data frame with the following columns
unique cluster ID
order of infection in the cluster
generation number (>=0)
ID of the infector
number of people infected by person
number of positive smears in the cluster
number in cluster
whether the cluster end was censored or not
other covariates in sample_covariates_df
randomly assigns covariates from sample_df. breadth not depth. Generate generation by generation as opposed to going up the branch til termination.