Description Usage Arguments Details Value
View source: R/simulate_general_outbreaks.R
Generate a single cluster of infections
1 2 3 4 5 6 | 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 |
randomly assigns covariates from sample_df. breadth not depth. Generate generation by generation as opposed to going up the branch til termination.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.