Description Usage Arguments Details Value
View source: R/draw_distributions.R
Draws a uniform random number and compares to trace probability to determine whether a case will be manually traced.
1 | draw_traced_status(n, sim_params)
|
n |
Number of cases to consider |
sim_params |
|
The probability of a case being traced, p_trace
, can either be a value that varies
with cluster size (if sim_params$vary_trace
is TRUE
) or a constant value equal
to sim_params$p_trace
if sim_params$vary_trace
is FALSE
.
When variable tracing based on cluster size is used, n
is assumed to be the cluster size
because it is assumed that this function would be called be create_state_df
for all
secondary infections together. The three possible variable tracing values are for cluster sizes of:
less than 10 cases, 11-24 cases and 25 or more cases. The vector sim_params$p_trace_vary
sets the trace probability for each of these three cluster sizes.
A boolean vector of length n for each case's manual tracing status
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.