draw_traced_status: Determine whether a case is being manually traced by public...

Description Usage Arguments Details Value

View source: R/draw_distributions.R

Description

Draws a uniform random number and compares to trace probability to determine whether a case will be manually traced.

Usage

1
draw_traced_status(n, sim_params)

Arguments

n

Number of cases to consider

sim_params

sim_params object (a list) containing simulation parameters, where all of the information needed to determine the probability of a case being traced (p_trace) are found within:

  • sim_params$vary_trace: Boolean to determine whether p_trace varies based on cluster size or whether a single constant value for p_trace is used.

  • sim_params$p_trace_vary: Defines the p_trace value for each cluster size group. Ignored if sim_params$vary_trace is FALSE.

  • sim_params$p_trace: Constant p_trace value used at all times. Ignored if sim_params$vary_trace is TRUE.

Details

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.

Value

A boolean vector of length n for each case's manual tracing status


bcgov/epi.branch.sim documentation built on Dec. 16, 2020, 5:49 a.m.