draw_isolation_delay_period: Draw delay to isolation periods for new cases

Description Usage Arguments Details Value

View source: R/draw_distributions.R

Description

The number of days between symptom onset and isolation, which may be negative if isolation occurs prior to symptom onset (as sometimes the case with traced cases).

Usage

1
2
3
4
5
6
draw_isolation_delay_period(
  state_df,
  sim_params,
  primary_state_df = NULL,
  primary_case_ids = NULL
)

Arguments

state_df

state_df object for the simulation

sim_params

sim_params object (a list) containing simulation parameters, where all of the information needed to describe the distribution is found within sim_params$iso_delay_params. Current distributions possible are:

  • uniform: Delay is drawn from uniform distributions with attributes "min" and "max" given in sim_params$iso_delay_params for each type of case. Min/Max values to be provided are:

    • iso_delay_traced_[min|max]: Range for manually traced cases

    • iso_delay_untraced_[min|max]: Range for untraced cases from the non-distancing population.

    • iso_delay_untraced_pd_[min|max]: Rnage for untraced cases from the distancing population (any case with contact_rate less than 1).

    Cases traced by the app (require both index and secondary cases to be app users and for the secondary case to be app-compliant) have a zero day delay.

  • Hellewell: Delay is drawn from a Weibull distribution with attributes "shape" and "scale" given in sim_params$iso_delay_params. Traced cases have their delay set to zero days.

primary_state_df

The state_df object for the index/primary cases. Defaults to NULL. Only required for traced cases (i.e. not needed when generating initial or imported cases).

primary_case_ids

A list of case_ids for the primary cases. Not required for initial or imported cases. Defaults to NULL.

Details

Within the list object sim_params$iso_delay_params, the user can define several delay periods based on tracing type, tracing status, and whether the case is practicing distancing. Traced cases have their delays measured from the index case's isolation time, so traced cases may isolate prior to their own symptom onset. Untraced cases have delays measured from the start of their own symptom onset. The untraced timeline is always considered for traced cases, so that if a traced case would have been isolated earlier just because of their symptom onset timeline, they would isolate at this earlier time.

Although this function returns the number of days between symptom onset and isolation, the delay returned by this function may be negative if isolation occurs prior to symptom onset.

Value

A vector of length n for case delay to isolation, measured from start of symptom onset (double)


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