knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
{css, echo=FALSE}
pre, code {white-space:pre !important; overflow-x:auto}
This vignette provides detailed descriptions of the columns in the two output data frames, state_df
and record_df
. It is recommended to first read the introductory vignette as well as the first example vignette before diving into this one. For a detailed description of all input parameters, see the parameters vignette.
state_df
data frameThis data frame is a "state vector" that evolves over time and only contains cases that are still actively influencing the simulation. When cases are isolated or inactive, they are removed from this data frame.
Entries with a * to the left of the column name are also present in the record_df
data frame with the same name and entries marked by ** are present with a slightly modified name or meaning.
| | Column name | Data type | Description |
| :-: | :---------- | :-------- | :---------- |
| * | case_id
| Integer | Unique identification number for each case |
| | status
| String | One of incubation
, symptomatic
, asymptomatic
, isolated
or inactive
for the case's current status. More details in the introductory vignette. Same as s_status
in record_df
. |
| * | is_traced
| Boolean | Flag for whether case is manually traced |
| * | is_trace_app_user
| Boolean | Flag for whether case uses a contact tracing app |
| * | is_trace_app_comply
| Boolean | Flag for whether case would comply with contact tracing app isolation instructions |
| * | is_traced_by_app
| Boolean | Flag for whether case is traced by app (requires both index case and this case having is_trace_app_user=TRUE
) |
| * | is_symptomatic
| Boolean | Flag for whether case is symptomatic |
| | days_infected
| Double | Counter for number of days since case's infection began |
| | incubation_length
| Double | Case incubation period, in days. Same as d_incub
in record_df
. |
| | isolation_delay
| Double | Case isolation delay time, measured in days from symptom onset time. Same as d_iso_delay
in record_df
. |
| | infection_length
| Double | Case total infection duration, measured in days from start of infection. Same as d_infection
in record_df
. |
| * | contact_rate
| Double | Case relative contact rate, where 1 is the normal contact rate. Should be a value between 0 and 1, inclusive. |
| | n_sec_infects
| Integer | Counter for number of outstanding secondary infections with this case as the index case. This counter decreases by one for every new secondary infection generated by this case. In record_df
, the column with the same name is not a counter and always contains the total secondary infections from this case. |
| | generation_intervals
| Double, or vector of doubles | A list of generation intervals corresponding to the outstanding secondary infections where this case is the index case. Generation intervals in this list are removed when the secondary infection happens. In record_df
, the column d_generation_ints
contains the generation intervals for all secondary infections caused by this case. Takes value numeric(0)
when there are no outstanding secondary infections. |
| * | non_infect_generations
| Double, or vector of doubles | A list of generation intervals for potential secondary infections that were prevented due to interventions such as case isolation and/or potential infections with generation intervals beyond the infection_length
. Takes value numeric(0)
when there are no prevented secondary infections. |
record_df
data frameThis data frame is a complete record for all cases that ever existed in the simulation. As cases evolve over time, this data frame is updated and information is appended. Information is never removed or overwritten, with the exception of the s_status
column, which is updated to the case's current state.
Entries with a * to the left of the column name are also present in the state_df
data frame with the same name and entries marked by ** are present with a slightly modified name or meaning.
| | Column name | Data type | Description |
| :-: | :---------- | :-------- | :---------- |
| * | case_id
| Integer | Unique identification number for each case |
| | source
| String | Either a string equal to the index case's case_id
or "imported" if this case was imported.
| * | is_traced
| Boolean | Flag for whether case is manually traced |
| * | is_trace_app_user
| Boolean | Flag for whether case uses a contact tracing app |
| * | is_traced_by_app
| Boolean | Flag for whether case is traced by app (requires both index case and this case having is_trace_app_user=TRUE
) |
| * | is_trace_app_comply
| Boolean | Flag for whether case would comply with contact tracing app isolation instructions |
| * | is_symptomatic
| Boolean | Flag for whether case is symptomatic |
| | d_incub
| Double | Case incubation period, in days. Same as incubation_length
in state_df
. |
| | d_iso_delay
| Double | Case isolation delay time, measured in days from symptom onset time. Same as isolation_delay
in state_df
. |
| | d_infection
| Double | Case total infection duration, measured in days from start of infection. Same as infection_length
in state_df
. |
| * | contact_rate
| Double | Case relative contact rate, where 1 is the normal contact rate. Should be a value between 0 and 1, inclusive. |
| | n_sec_infects
| Integer | Number of total secondary infections with this case as the index case. In state_df
, the column with the same name is a counter of outstanding secondary infections and decreases by one for every new secondary infection generated by this case. |
| | d_generation_ints
| Double, or vector of doubles | A list of all generation intervals corresponding to the all secondary infections where this case is the index case. In state_df
, the column generation_intervals
serves a similar purpose but only contains information for secondary infections yet to happen. Takes value numeric(0)
when there are no outstanding secondary infections. |
| | t_inf
| Double | Simulation time-step where case was added. Meant for debugging and rather than analysis. |
| | t_symp
| Double | Simulation time-step where case status changed to symptomatic
. Takes value NA
if this status is never reached. Meant for debugging and rather than analysis. |
| | t_iso
| Double | Simulation time-step where case status changed to isolated
. Takes value NA
if this status is never reached. Meant for debugging and rather than analysis. |
| | t_inact
| Double | Simulation time-step where case status changed to inactive
. Takes value NA
if this status is never reached. Meant for debugging and rather than analysis. |
| | cases_inf
| NA
| Placeholder for a vector of doubles containing the case_id
for all secondary infections with this case as the index case. Not yet implemented, so the value is currently always NA
. |
| | s_status
| String | One of incubation
, symptomatic
, asymptomatic
, isolated
or inactive
for the case's current status. More details in the introductory vignette. Same as status
in state_df
. |
| * | non_infect_generations
| Double, or vector of doubles | A list of generation intervals for potential secondary infections that were prevented due to interventions such as case isolation and/or potential infections with generation intervals beyond the infection_length
. Takes value numeric(0)
when there are no prevented secondary infections. |
Description of input parameters
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.