From fff9323b9feb90a0eb222a90d1aa22ad814240f9 Mon Sep 17 00:00:00 2001 From: Joshua Lambert Date: Fri, 22 Mar 2024 11:56:47 +0000 Subject: [PATCH 1/7] updated .sim_network_bp to use infectious period instead of contact interval, closes #61 --- R/sim_network_bp.R | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/R/sim_network_bp.R b/R/sim_network_bp.R index e479d6bf..f0c7a116 100644 --- a/R/sim_network_bp.R +++ b/R/sim_network_bp.R @@ -5,8 +5,9 @@ #' Simulate a branching process on a infinite network where the contact #' distribution provides a function to sample the number of contacts of each #' individual in the simulation. Each contact is then infected with the -#' probability of infection. The time between each infection is determined -#' by the contact interval function. +#' probability of infection. The time between each contact is assumed to be +#' evenly distributed across the infectious period of the infected individual, +#' and is independent of whether the contact becomes infected. #' #' @details #' The contact distribution sampled takes the network effect @@ -22,7 +23,7 @@ #' @return A `` with the contact and transmission chain data. #' @keywords internal .sim_network_bp <- function(contact_distribution, - contact_interval, + infect_period, prob_infect, max_outbreak_size, config) { @@ -92,9 +93,16 @@ infect <- stats::rbinom(n = contacts[i], size = 1, prob = prob_infect) infected[vec_idx] <- as.numeric(infect) - # add delay time - time[vec_idx] <- contact_interval(length(vec_idx)) + - time[ancestor_idx[i]] + # compute infectious period for ancestor + contact_infect_period <- infect_period(1) + + # assume contacts are evenly distributed across the infectious period + contact_times <- stats::runif( + n = length(vec_idx), + min = 0, + max = contact_infect_period + ) + time[vec_idx] <- contact_times + time[ancestor_idx[i]] } } ancestor_idx <- setdiff(which(infected == 1), prev_ancestors) From c647bc99eb44114feea4fb9072f0726e73aeb693 Mon Sep 17 00:00:00 2001 From: Joshua Lambert Date: Fri, 22 Mar 2024 12:04:43 +0000 Subject: [PATCH 2/7] updated functions to use infectious period, relates #61 --- R/checkers.R | 4 ++-- R/sim_contacts.R | 16 ++++++++-------- R/sim_internal.R | 4 ++-- R/sim_linelist.R | 30 ++++++++++++++++-------------- R/sim_outbreak.R | 16 ++++++++-------- man/dot-check_sim_input.Rd | 14 ++++++++------ man/dot-sim_internal.Rd | 14 ++++++++------ man/dot-sim_network_bp.Rd | 19 +++++++++++-------- man/sim_contacts.Rd | 20 +++++++++++--------- man/sim_linelist.Rd | 22 ++++++++++++---------- man/sim_outbreak.Rd | 20 +++++++++++--------- 11 files changed, 97 insertions(+), 82 deletions(-) diff --git a/R/checkers.R b/R/checkers.R index 9d99be72..1dfa26c7 100644 --- a/R/checkers.R +++ b/R/checkers.R @@ -115,7 +115,7 @@ #' @keywords internal .check_sim_input <- function(sim_type = c("linelist", "contacts", "outbreak"), contact_distribution, - contact_interval, + infect_period, prob_infect, outbreak_start_date, outbreak_size, @@ -133,7 +133,7 @@ checkmate::assert_number(prob_infect, lower = 0, upper = 1) .check_func_req_args(contact_distribution) - .check_func_req_args(contact_interval) + .check_func_req_args(infect_period) checkmate::assert_date(outbreak_start_date) checkmate::assert_integerish(outbreak_size, lower = 1, len = 2) diff --git a/R/sim_contacts.R b/R/sim_contacts.R index ee4e487d..61f15df1 100644 --- a/R/sim_contacts.R +++ b/R/sim_contacts.R @@ -20,20 +20,20 @@ #' prob_distribution_params = c(mean = 2) #' ) #' -#' contact_interval <- epiparameter::epidist( +#' infect_period <- epiparameter::epidist( #' disease = "COVID-19", -#' epi_dist = "contact interval", +#' epi_dist = "infectious period", #' prob_distribution = "gamma", #' prob_distribution_params = c(shape = 1, scale = 1) #' ) #' #' contacts <- sim_contacts( #' contact_distribution = contact_distribution, -#' contact_interval = contact_interval, +#' infect_period = infect_period, #' prob_infect = 0.5 #' ) sim_contacts <- function(contact_distribution, - contact_interval, + infect_period, prob_infect, outbreak_start_date = as.Date("2023-01-01"), outbreak_size = c(10, 1e4), @@ -47,17 +47,17 @@ sim_contacts <- function(contact_distribution, # check and convert distribution to func if needed before .check_sim_input() stopifnot( "Input delay distributions need to be either functions or " = - inherits(contact_interval, c("function", "epidist")) + inherits(infect_period, c("function", "epidist")) ) contact_distribution <- as.function( contact_distribution, func_type = "density" ) - contact_interval <- as.function(contact_interval, func_type = "generate") + infect_period <- as.function(infect_period, func_type = "generate") .check_sim_input( sim_type = "contacts", contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = prob_infect, outbreak_start_date = outbreak_start_date, outbreak_size = outbreak_size, @@ -75,7 +75,7 @@ sim_contacts <- function(contact_distribution, contacts <- .sim_internal( sim_type = "contacts", contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = prob_infect, outbreak_start_date = outbreak_start_date, outbreak_size = outbreak_size, diff --git a/R/sim_internal.R b/R/sim_internal.R index cd4b223b..af8cc44b 100644 --- a/R/sim_internal.R +++ b/R/sim_internal.R @@ -13,7 +13,7 @@ #' @keywords internal .sim_internal <- function(sim_type = c("linelist", "contacts", "outbreak"), contact_distribution, - contact_interval, + infect_period, prob_infect, onset_to_hosp = NULL, onset_to_death = NULL, @@ -36,7 +36,7 @@ while (num_cases < min(outbreak_size)) { .data <- .sim_network_bp( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = prob_infect, max_outbreak_size = max(outbreak_size), config = config diff --git a/R/sim_linelist.R b/R/sim_linelist.R index 876be93e..9978e0a5 100644 --- a/R/sim_linelist.R +++ b/R/sim_linelist.R @@ -24,11 +24,13 @@ #' the contact distribution. This is any discrete density function that #' produces non-negative integers (including zero, \eqn{\mathbb{N}_0}) for the #' number of contacts per infection. -#' @param contact_interval An `` object or anonymous function for -#' the contact interval. This is analogous to the serial interval or generation -#' time, but defines the time interval between an individual being -#' infected/infectious (in the simulation the latency period is assumed to be -#' zero) and having contact with another susceptible individual. +#' @param infect_period An `` object or anonymous function for +#' the infectious period. This defines the duration from becoming infectious +#' to no longer infectious. In the simulation, individuals are assumed to +#' become infectious immediately after being infected (the latency period is +#' assumed to be zero). The time intervals between an infected individual and +#' their contacts are assumed to be uniformly distributed within the +#' infectious period. #' @param prob_infect A single `numeric` for the probability of a secondary #' contact being infected by an infected primary contact. #' @param onset_to_hosp An `` object or anonymous function for @@ -93,9 +95,9 @@ #' prob_distribution_params = c(mean = 2) #' ) #' -#' contact_interval <- epiparameter::epidist( +#' infect_period <- epiparameter::epidist( #' disease = "COVID-19", -#' epi_dist = "contact interval", +#' epi_dist = "infectious period", #' prob_distribution = "gamma", #' prob_distribution_params = c(shape = 1, scale = 1) #' ) @@ -116,7 +118,7 @@ #' # example with single hospitalisation risk for entire population #' linelist <- sim_linelist( #' contact_distribution = contact_distribution, -#' contact_interval = contact_interval, +#' infect_period = infect_period, #' prob_infect = 0.5, #' onset_to_hosp = onset_to_hosp, #' onset_to_death = onset_to_death, @@ -134,7 +136,7 @@ #' ) #' linelist <- sim_linelist( #' contact_distribution = contact_distribution, -#' contact_interval = contact_interval, +#' infect_period = infect_period, #' prob_infect = 0.5, #' onset_to_hosp = onset_to_hosp, #' onset_to_death = onset_to_death, @@ -142,7 +144,7 @@ #' ) #' head(linelist) sim_linelist <- function(contact_distribution, - contact_interval, + infect_period, prob_infect, onset_to_hosp, onset_to_death, @@ -164,21 +166,21 @@ sim_linelist <- function(contact_distribution, stopifnot( "Input delay distributions need to be either functions or " = inherits(contact_distribution, c("function", "epidist")) && - inherits(contact_interval, c("function", "epidist")) && + inherits(infect_period, c("function", "epidist")) && inherits(onset_to_hosp, c("function", "epidist")) && inherits(onset_to_death, c("function", "epidist")) ) contact_distribution <- as.function( contact_distribution, func_type = "density" ) - contact_interval <- as.function(contact_interval, func_type = "generate") + infect_period <- as.function(infect_period, func_type = "generate") onset_to_hosp <- as.function(onset_to_hosp, func_type = "generate") onset_to_death <- as.function(onset_to_death, func_type = "generate") .check_sim_input( sim_type = "linelist", contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = prob_infect, outbreak_start_date = outbreak_start_date, outbreak_size = outbreak_size, @@ -226,7 +228,7 @@ sim_linelist <- function(contact_distribution, linelist <- .sim_internal( sim_type = "linelist", contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = prob_infect, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, diff --git a/R/sim_outbreak.R b/R/sim_outbreak.R index 66b70f7e..81eb6119 100644 --- a/R/sim_outbreak.R +++ b/R/sim_outbreak.R @@ -25,9 +25,9 @@ #' prob_distribution_params = c(mean = 2) #' ) #' -#' contact_interval <- epiparameter::epidist( +#' infect_period <- epiparameter::epidist( #' disease = "COVID-19", -#' epi_dist = "serial interval", +#' epi_dist = "infectious period", #' prob_distribution = "gamma", #' prob_distribution_params = c(shape = 1, scale = 1) #' ) @@ -48,13 +48,13 @@ #' #' outbreak <- sim_outbreak( #' contact_distribution = contact_distribution, -#' contact_interval = contact_interval, +#' infect_period = infect_period, #' prob_infect = 0.5, #' onset_to_hosp = onset_to_hosp, #' onset_to_death = onset_to_death #' ) sim_outbreak <- function(contact_distribution, - contact_interval, + infect_period, prob_infect, onset_to_hosp, onset_to_death, @@ -81,21 +81,21 @@ sim_outbreak <- function(contact_distribution, stopifnot( "Input delay distributions need to be either functions or " = inherits(contact_distribution, c("function", "epidist")) && - inherits(contact_interval, c("function", "epidist")) && + inherits(infect_period, c("function", "epidist")) && inherits(onset_to_hosp, c("function", "epidist")) && inherits(onset_to_death, c("function", "epidist")) ) contact_distribution <- as.function( contact_distribution, func_type = "density" ) - contact_interval <- as.function(contact_interval, func_type = "generate") + infect_period <- as.function(infect_period, func_type = "generate") onset_to_hosp <- as.function(onset_to_hosp, func_type = "generate") onset_to_death <- as.function(onset_to_death, func_type = "generate") .check_sim_input( sim_type = "outbreak", contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = prob_infect, outbreak_start_date = outbreak_start_date, outbreak_size = outbreak_size, @@ -144,7 +144,7 @@ sim_outbreak <- function(contact_distribution, outbreak <- .sim_internal( sim_type = "outbreak", contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = prob_infect, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, diff --git a/man/dot-check_sim_input.Rd b/man/dot-check_sim_input.Rd index 60201365..fccae92d 100644 --- a/man/dot-check_sim_input.Rd +++ b/man/dot-check_sim_input.Rd @@ -7,7 +7,7 @@ .check_sim_input( sim_type = c("linelist", "contacts", "outbreak"), contact_distribution, - contact_interval, + infect_period, prob_infect, outbreak_start_date, outbreak_size, @@ -32,11 +32,13 @@ the contact distribution. This is any discrete density function that produces non-negative integers (including zero, \eqn{\mathbb{N}_0}) for the number of contacts per infection.} -\item{contact_interval}{An \verb{} object or anonymous function for -the contact interval. This is analogous to the serial interval or generation -time, but defines the time interval between an individual being -infected/infectious (in the simulation the latency period is assumed to be -zero) and having contact with another susceptible individual.} +\item{infect_period}{An \verb{} object or anonymous function for +the infectious period. This defines the duration from becoming infectious +to no longer infectious. In the simulation, individuals are assumed to +become infectious immediately after being infected (the latency period is +assumed to be zero). The time intervals between an infected individual and +their contacts are assumed to be uniformly distributed within the +infectious period.} \item{prob_infect}{A single \code{numeric} for the probability of a secondary contact being infected by an infected primary contact.} diff --git a/man/dot-sim_internal.Rd b/man/dot-sim_internal.Rd index 12f130da..a5770436 100644 --- a/man/dot-sim_internal.Rd +++ b/man/dot-sim_internal.Rd @@ -8,7 +8,7 @@ within \pkg{simulist}} .sim_internal( sim_type = c("linelist", "contacts", "outbreak"), contact_distribution, - contact_interval, + infect_period, prob_infect, onset_to_hosp = NULL, onset_to_death = NULL, @@ -34,11 +34,13 @@ the contact distribution. This is any discrete density function that produces non-negative integers (including zero, \eqn{\mathbb{N}_0}) for the number of contacts per infection.} -\item{contact_interval}{An \verb{} object or anonymous function for -the contact interval. This is analogous to the serial interval or generation -time, but defines the time interval between an individual being -infected/infectious (in the simulation the latency period is assumed to be -zero) and having contact with another susceptible individual.} +\item{infect_period}{An \verb{} object or anonymous function for +the infectious period. This defines the duration from becoming infectious +to no longer infectious. In the simulation, individuals are assumed to +become infectious immediately after being infected (the latency period is +assumed to be zero). The time intervals between an infected individual and +their contacts are assumed to be uniformly distributed within the +infectious period.} \item{prob_infect}{A single \code{numeric} for the probability of a secondary contact being infected by an infected primary contact.} diff --git a/man/dot-sim_network_bp.Rd b/man/dot-sim_network_bp.Rd index 8c93c97f..b3fe498c 100644 --- a/man/dot-sim_network_bp.Rd +++ b/man/dot-sim_network_bp.Rd @@ -7,7 +7,7 @@ infection for each contact} \usage{ .sim_network_bp( contact_distribution, - contact_interval, + infect_period, prob_infect, max_outbreak_size, config @@ -19,11 +19,13 @@ the contact distribution. This is any discrete density function that produces non-negative integers (including zero, \eqn{\mathbb{N}_0}) for the number of contacts per infection.} -\item{contact_interval}{An \verb{} object or anonymous function for -the contact interval. This is analogous to the serial interval or generation -time, but defines the time interval between an individual being -infected/infectious (in the simulation the latency period is assumed to be -zero) and having contact with another susceptible individual.} +\item{infect_period}{An \verb{} object or anonymous function for +the infectious period. This defines the duration from becoming infectious +to no longer infectious. In the simulation, individuals are assumed to +become infectious immediately after being infected (the latency period is +assumed to be zero). The time intervals between an infected individual and +their contacts are assumed to be uniformly distributed within the +infectious period.} \item{prob_infect}{A single \code{numeric} for the probability of a secondary contact being infected by an infected primary contact.} @@ -38,8 +40,9 @@ A \verb{} with the contact and transmission chain data. Simulate a branching process on a infinite network where the contact distribution provides a function to sample the number of contacts of each individual in the simulation. Each contact is then infected with the -probability of infection. The time between each infection is determined -by the contact interval function. +probability of infection. The time between each contact is assumed to be +evenly distributed across the infectious period of the infected individual, +and is independent of whether the contact becomes infected. } \details{ The contact distribution sampled takes the network effect diff --git a/man/sim_contacts.Rd b/man/sim_contacts.Rd index 3660da1d..8c2c952a 100644 --- a/man/sim_contacts.Rd +++ b/man/sim_contacts.Rd @@ -6,7 +6,7 @@ \usage{ sim_contacts( contact_distribution, - contact_interval, + infect_period, prob_infect, outbreak_start_date = as.Date("2023-01-01"), outbreak_size = c(10, 10000), @@ -22,11 +22,13 @@ the contact distribution. This is any discrete density function that produces non-negative integers (including zero, \eqn{\mathbb{N}_0}) for the number of contacts per infection.} -\item{contact_interval}{An \verb{} object or anonymous function for -the contact interval. This is analogous to the serial interval or generation -time, but defines the time interval between an individual being -infected/infectious (in the simulation the latency period is assumed to be -zero) and having contact with another susceptible individual.} +\item{infect_period}{An \verb{} object or anonymous function for +the infectious period. This defines the duration from becoming infectious +to no longer infectious. In the simulation, individuals are assumed to +become infectious immediately after being infected (the latency period is +assumed to be zero). The time intervals between an infected individual and +their contacts are assumed to be uniformly distributed within the +infectious period.} \item{prob_infect}{A single \code{numeric} for the probability of a secondary contact being infected by an infected primary contact.} @@ -75,16 +77,16 @@ contact_distribution <- epiparameter::epidist( prob_distribution_params = c(mean = 2) ) -contact_interval <- epiparameter::epidist( +infect_period <- epiparameter::epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) ) contacts <- sim_contacts( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5 ) } diff --git a/man/sim_linelist.Rd b/man/sim_linelist.Rd index 0de9aeac..9262e607 100644 --- a/man/sim_linelist.Rd +++ b/man/sim_linelist.Rd @@ -6,7 +6,7 @@ \usage{ sim_linelist( contact_distribution, - contact_interval, + infect_period, prob_infect, onset_to_hosp, onset_to_death, @@ -28,11 +28,13 @@ the contact distribution. This is any discrete density function that produces non-negative integers (including zero, \eqn{\mathbb{N}_0}) for the number of contacts per infection.} -\item{contact_interval}{An \verb{} object or anonymous function for -the contact interval. This is analogous to the serial interval or generation -time, but defines the time interval between an individual being -infected/infectious (in the simulation the latency period is assumed to be -zero) and having contact with another susceptible individual.} +\item{infect_period}{An \verb{} object or anonymous function for +the infectious period. This defines the duration from becoming infectious +to no longer infectious. In the simulation, individuals are assumed to +become infectious immediately after being infected (the latency period is +assumed to be zero). The time intervals between an infected individual and +their contacts are assumed to be uniformly distributed within the +infectious period.} \item{prob_infect}{A single \code{numeric} for the probability of a secondary contact being infected by an infected primary contact.} @@ -134,9 +136,9 @@ contact_distribution <- epiparameter::epidist( prob_distribution_params = c(mean = 2) ) -contact_interval <- epiparameter::epidist( +infect_period <- epiparameter::epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) ) @@ -157,7 +159,7 @@ onset_to_death <- epiparameter::epidist_db( # example with single hospitalisation risk for entire population linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -175,7 +177,7 @@ age_dep_hosp_risk <- data.frame( ) linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, diff --git a/man/sim_outbreak.Rd b/man/sim_outbreak.Rd index d36545b7..0151e028 100644 --- a/man/sim_outbreak.Rd +++ b/man/sim_outbreak.Rd @@ -6,7 +6,7 @@ \usage{ sim_outbreak( contact_distribution, - contact_interval, + infect_period, prob_infect, onset_to_hosp, onset_to_death, @@ -30,11 +30,13 @@ the contact distribution. This is any discrete density function that produces non-negative integers (including zero, \eqn{\mathbb{N}_0}) for the number of contacts per infection.} -\item{contact_interval}{An \verb{} object or anonymous function for -the contact interval. This is analogous to the serial interval or generation -time, but defines the time interval between an individual being -infected/infectious (in the simulation the latency period is assumed to be -zero) and having contact with another susceptible individual.} +\item{infect_period}{An \verb{} object or anonymous function for +the infectious period. This defines the duration from becoming infectious +to no longer infectious. In the simulation, individuals are assumed to +become infectious immediately after being infected (the latency period is +assumed to be zero). The time intervals between an infected individual and +their contacts are assumed to be uniformly distributed within the +infectious period.} \item{prob_infect}{A single \code{numeric} for the probability of a secondary contact being infected by an infected primary contact.} @@ -146,9 +148,9 @@ contact_distribution <- epiparameter::epidist( prob_distribution_params = c(mean = 2) ) -contact_interval <- epiparameter::epidist( +infect_period <- epiparameter::epidist( disease = "COVID-19", - epi_dist = "serial interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) ) @@ -169,7 +171,7 @@ onset_to_death <- epiparameter::epidist_db( outbreak <- sim_outbreak( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death From 0ebc80f41663fdaa34a7fa3cdbd7f8cd02d89b7b Mon Sep 17 00:00:00 2001 From: Joshua Lambert Date: Fri, 22 Mar 2024 12:06:15 +0000 Subject: [PATCH 3/7] updated tests and snapshots with infectious period --- tests/testthat/_snaps/sim_contacts.md | 492 +++++++--------- tests/testthat/_snaps/sim_linelist.md | 496 +++++++--------- tests/testthat/_snaps/sim_network_bp.md | 74 ++- tests/testthat/_snaps/sim_outbreak.md | 730 ++++++++++-------------- tests/testthat/test-checkers.R | 29 +- tests/testthat/test-sim_contacts.R | 16 +- tests/testthat/test-sim_linelist.R | 32 +- tests/testthat/test-sim_network_bp.R | 12 +- tests/testthat/test-sim_outbreak.R | 12 +- 9 files changed, 827 insertions(+), 1066 deletions(-) diff --git a/tests/testthat/_snaps/sim_contacts.md b/tests/testthat/_snaps/sim_contacts.md index 015af06b..24c3ae9f 100644 --- a/tests/testthat/_snaps/sim_contacts.md +++ b/tests/testthat/_snaps/sim_contacts.md @@ -1,318 +1,238 @@ # sim_contacts works as expected Code - sim_contacts(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_contacts(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5) Output - from to age sex date_first_contact - 1 Thao Yokota-Stroman Sammi Elizondo 62 f 2023-01-02 - 2 Thao Yokota-Stroman Audrey Ostrom 20 f 2023-01-04 - 3 Sammi Elizondo Ghaamid al-Abdallah 29 m 2023-01-05 - 4 Sammi Elizondo Faadil al-Toure 42 m 2023-01-03 - 5 Sammi Elizondo Tami Hicar 60 f 2023-01-02 - 6 Sammi Elizondo Kristin Gentry 65 f 2022-12-31 - 7 Faadil al-Toure Elias Schell 28 m 2023-01-02 - 8 Faadil al-Toure Stephanie Quezada 78 f 2022-12-30 - 9 Tami Hicar Alison Pham 31 f 2023-01-06 - 10 Tami Hicar Joe Martinez 12 m 2023-01-04 - 11 Tami Hicar Muneera al-Nazir 80 f 2023-01-03 - 12 Elias Schell Alea Butler 44 f 2022-12-30 - 13 Elias Schell Neal Amery 74 m 2023-01-01 - 14 Elias Schell Luis Mejia 26 m 2023-01-07 - 15 Elias Schell Awad el-Amara 33 m 2023-01-04 - 16 Elias Schell Joseph Plutt 4 m 2022-12-31 - 17 Alison Pham Cleevens Thrower 53 m 2023-01-06 - 18 Awad el-Amara James Smith Jr 86 m 2023-01-06 - 19 James Smith Jr Kalia Truong 89 f 2023-01-05 - 20 James Smith Jr Mary Weaver 24 f 2023-01-07 - 21 James Smith Jr Sydney Aguilar 37 f 2023-01-06 - 22 Sydney Aguilar Mariah Garcia 15 f 2023-01-07 - 23 Mariah Garcia Cade Gilbert 14 m 2023-01-06 - 24 Mariah Garcia Travis Roy 81 m 2023-01-07 - 25 Travis Roy Marc Xue 82 m 2023-01-07 - 26 Marc Xue Mathew Mcintire 72 m 2023-01-10 - 27 Marc Xue Steven Smith 53 m 2023-01-10 - 28 Marc Xue Cleevens Taylor 56 m 2023-01-05 - 29 Mathew Mcintire Saisuriya Wilson 71 m 2023-01-11 - 30 Mathew Mcintire Alejandro Lopez 50 m 2023-01-08 - 31 Mathew Mcintire Dakota Harvie 73 m 2023-01-07 - 32 Mathew Mcintire Nabeela al-Rahmani 20 f 2023-01-08 - 33 Saisuriya Wilson Jerry Williams 75 m 2023-01-15 - 34 Saisuriya Wilson Manaahil al-Ebrahim 2 f 2023-01-17 - 35 Alejandro Lopez Kelsey Mcclintock 3 f 2023-01-12 + from to age sex date_first_contact + 1 Barrington Johnson Nykalous Shumpert 51 m 2022-12-30 + 2 Barrington Johnson Alivia Perez 44 f 2023-01-01 + 3 Alivia Perez Arshad al-Basa 49 m 2023-01-02 + 4 Alivia Perez Madison Krause 60 f 2023-01-04 + 5 Alivia Perez Ashlan Allen 56 f 2022-12-29 + 6 Arshad al-Basa Turfa el-Farah 49 f 2023-01-03 + 7 Arshad al-Basa Ronald Welch 50 m 2023-01-02 + 8 Arshad al-Basa Simon Pickett 7 m 2023-01-03 + 9 Arshad al-Basa Destiny Hart 20 f 2023-01-02 + 10 Arshad al-Basa Jeramy Fitch 24 m 2023-01-02 + 11 Arshad al-Basa Joshua Ryckman 51 m 2023-01-03 + 12 Ronald Welch Adrian Wang 53 m 2023-01-02 + 13 Ronald Welch Luis Quintana 16 m 2023-01-02 + 14 Jeramy Fitch Janayva Ambrozic 83 f 2023-01-07 + 15 Jeramy Fitch Nicole Vazquez Pallares 2 f 2023-01-02 + 16 Jeramy Fitch Nusaiba al-Rassi 48 f 2023-01-03 + 17 Adrian Wang Korren Watts 65 f 2023-01-04 + 18 Janayva Ambrozic Shan Saldanha 44 f 2023-01-03 + 19 Janayva Ambrozic Jonathan Krishnan 77 m 2023-01-03 + 20 Janayva Ambrozic Alexander Brown 90 m 2023-01-03 + 21 Janayva Ambrozic Cruz Hernandez 66 m 2023-01-07 + 22 Nicole Vazquez Pallares Ryanna Vialpando 19 f 2023-01-04 + 23 Nusaiba al-Rassi Preston Miles 17 m 2022-12-29 + 24 Nusaiba al-Rassi Drue White 34 m 2023-01-03 + 25 Cruz Hernandez Breanna Crandall 75 f 2022-12-31 date_last_contact was_case status - 1 2023-01-05 Y case - 2 2023-01-07 N under_followup - 3 2023-01-08 N under_followup - 4 2023-01-04 Y case - 5 2023-01-04 Y case - 6 2023-01-03 N under_followup - 7 2023-01-04 Y case - 8 2023-01-05 Y case - 9 2023-01-09 Y case - 10 2023-01-06 N under_followup - 11 2023-01-05 N lost_to_followup - 12 2023-01-03 N under_followup - 13 2023-01-05 N lost_to_followup - 14 2023-01-08 N under_followup + 1 2023-01-03 N under_followup + 2 2023-01-02 Y case + 3 2023-01-05 Y case + 4 2023-01-07 N under_followup + 5 2023-01-06 N under_followup + 6 2023-01-06 N unknown + 7 2023-01-05 Y case + 8 2023-01-04 Y case + 9 2023-01-06 N lost_to_followup + 10 2023-01-05 Y case + 11 2023-01-06 N under_followup + 12 2023-01-04 Y case + 13 2023-01-04 N under_followup + 14 2023-01-10 Y case 15 2023-01-05 Y case - 16 2023-01-04 N lost_to_followup - 17 2023-01-09 N under_followup - 18 2023-01-07 Y case - 19 2023-01-06 N under_followup - 20 2023-01-08 N lost_to_followup - 21 2023-01-08 Y case - 22 2023-01-08 Y case - 23 2023-01-08 N under_followup - 24 2023-01-08 Y case - 25 2023-01-09 Y case - 26 2023-01-11 Y case - 27 2023-01-13 N under_followup - 28 2023-01-09 N under_followup - 29 2023-01-11 Y case - 30 2023-01-11 Y case - 31 2023-01-12 N under_followup - 32 2023-01-10 N under_followup - 33 2023-01-15 N under_followup - 34 2023-01-18 N under_followup - 35 2023-01-14 Y case + 16 2023-01-04 Y case + 17 2023-01-04 N under_followup + 18 2023-01-06 N under_followup + 19 2023-01-09 N unknown + 20 2023-01-06 N lost_to_followup + 21 2023-01-10 Y case + 22 2023-01-07 N under_followup + 23 2023-01-05 N under_followup + 24 2023-01-06 Y case + 25 2023-01-04 N under_followup # sim_contacts works as expected with modified config Code - sim_contacts(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_contacts(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, config = create_config(last_contact_distribution = "geom", last_contact_distribution_params = c(prob = 0.5))) Output - from to age sex date_first_contact - 1 Hannah Keeler Sabeeka al-Mattar 2 f 2022-12-31 - 2 Hannah Keeler Andrew Eckman 3 m 2022-12-31 - 3 Sabeeka al-Mattar Josiah Williams 38 m 2023-01-01 - 4 Sabeeka al-Mattar Karie Phanthavongsa 15 f 2023-01-01 - 5 Sabeeka al-Mattar Laura Ann Daniels 28 f 2022-12-31 - 6 Sabeeka al-Mattar Josue Aguilera-Aguilera 55 m 2022-12-29 - 7 Karie Phanthavongsa Khanh Long 69 m 2022-12-31 - 8 Karie Phanthavongsa Aleia Pope 78 f 2022-12-31 - 9 Laura Ann Daniels Astitwa Czajka 37 m 2023-01-02 - 10 Laura Ann Daniels Sara Fish 43 f 2023-01-03 - 11 Laura Ann Daniels Jung Allen 81 m 2022-12-28 - 12 Khanh Long Xylonna Curry 1 f 2023-01-02 - 13 Khanh Long Joe Ortiz 90 m 2022-12-31 - 14 Khanh Long Danica Boykin 45 f 2023-01-01 - 15 Khanh Long Joshua Jackson 83 m 2023-01-01 - 16 Khanh Long Afeef al-Shaheen 90 m 2022-12-28 - 17 Astitwa Czajka Elijah Hartmann 23 m 2023-01-02 - 18 Joshua Jackson Nasreen al-Salameh 68 f 2022-12-30 - 19 Nasreen al-Salameh Menandez Tall Bull 80 m 2022-12-31 - 20 Nasreen al-Salameh Sarah Elliott 57 f 2023-01-01 - 21 Nasreen al-Salameh Sahar el-Hasan 52 f 2023-01-02 - 22 Sahar el-Hasan Mitchell Jackson 80 m 2023-01-02 - 23 Mitchell Jackson Ty' Esha Wilkins 34 f 2022-12-30 - 24 Mitchell Jackson Jazmine Watkins IV 35 f 2023-01-05 - 25 Jazmine Watkins IV Daleel al-Shahan 74 m 2023-01-05 - 26 Daleel al-Shahan Shabaan el-Pasha 70 m 2023-01-04 - 27 Daleel al-Shahan Steven Eagle 60 m 2023-01-07 - 28 Daleel al-Shahan Caleb Mbasi-Botuli 39 m 2023-01-07 - 29 Shabaan el-Pasha Melissa Ingham 49 f 2023-01-06 - 30 Shabaan el-Pasha Mahbooba al-Fadel 87 f 2023-01-12 - 31 Shabaan el-Pasha Mukarram al-Greiss 62 m 2023-01-07 - 32 Shabaan el-Pasha Leeann Lakkaraju 33 f 2023-01-02 - 33 Melissa Ingham Sadeeqa el-Aman 35 f 2023-01-07 - 34 Melissa Ingham Devante Owens 11 m 2023-01-13 - 35 Mahbooba al-Fadel Jordan Greene-King 13 m 2023-01-07 + from to age sex date_first_contact + 1 Marcus Lane Noyami Alonzo 46 f 2023-01-04 + 2 Marcus Lane Raynaldo Dorrance 19 m 2022-12-27 + 3 Raynaldo Dorrance Keeley Brown 75 f 2023-01-01 + 4 Raynaldo Dorrance Jackson Foster 16 m 2022-12-29 + 5 Raynaldo Dorrance Cody Flores 40 m 2022-12-28 + 6 Keeley Brown Hannah Aguirre-Rodriquez 9 f 2022-12-31 + 7 Keeley Brown Rory O'Dorisio 50 m 2023-01-02 + 8 Keeley Brown Hilmiyya al-Amiri 24 f 2023-01-01 + 9 Keeley Brown Margaret Tucker 10 f 2022-12-29 + 10 Keeley Brown Naomi Holley 79 f 2022-12-31 + 11 Keeley Brown Sheldon Salido 32 m 2022-12-31 + 12 Rory O'Dorisio Aquilah Santos 39 f 2022-12-29 + 13 Rory O'Dorisio Sam Summers 37 m 2022-12-29 + 14 Naomi Holley Brandon Hall 12 m 2022-12-31 + 15 Naomi Holley Deidra Byers 14 f 2022-12-31 + 16 Naomi Holley Danita Griffin 16 f 2022-12-29 + 17 Aquilah Santos Cleatus Edwards 15 m 2022-12-31 + 18 Brandon Hall Mariah Nguyen 2 f 2022-12-31 + 19 Brandon Hall Hailey Kilian 65 f 2022-12-31 + 20 Brandon Hall Elizabeth Damiana 67 f 2022-12-29 + 21 Brandon Hall Kyle Orio 73 m 2023-01-02 + 22 Deidra Byers Diego Fierro 17 m 2023-01-02 + 23 Danita Griffin Alexa Minter 84 f 2022-12-29 + 24 Danita Griffin Jelani Takahashi 5 m 2023-01-01 + 25 Kyle Orio Khaleel al-Demian 41 m 2022-12-30 date_last_contact was_case status - 1 2023-01-01 Y case - 2 2023-01-02 N under_followup - 3 2023-01-02 N unknown - 4 2023-01-02 Y case - 5 2023-01-05 Y case - 6 2023-01-02 N under_followup - 7 2023-01-02 Y case + 1 2023-01-06 N unknown + 2 2023-01-01 Y case + 3 2023-01-04 Y case + 4 2023-01-02 N under_followup + 5 2023-01-02 N lost_to_followup + 6 2023-01-02 N lost_to_followup + 7 2023-01-03 Y case 8 2023-01-03 Y case - 9 2023-01-03 Y case - 10 2023-01-05 N under_followup - 11 2023-01-04 N under_followup - 12 2023-01-05 N lost_to_followup - 13 2023-01-04 N under_followup - 14 2023-01-03 N unknown - 15 2023-01-03 Y case - 16 2023-01-05 N unknown - 17 2023-01-07 N lost_to_followup - 18 2023-01-05 Y case - 19 2023-01-04 N lost_to_followup - 20 2023-01-05 N under_followup + 9 2023-01-02 N under_followup + 10 2023-01-02 Y case + 11 2023-01-03 N lost_to_followup + 12 2023-01-03 Y case + 13 2023-01-03 N under_followup + 14 2023-01-02 Y case + 15 2023-01-02 Y case + 16 2023-01-03 Y case + 17 2023-01-03 N under_followup + 18 2023-01-04 N lost_to_followup + 19 2023-01-03 N lost_to_followup + 20 2023-01-03 N under_followup 21 2023-01-04 Y case - 22 2023-01-06 Y case - 23 2023-01-06 N lost_to_followup - 24 2023-01-07 Y case - 25 2023-01-07 Y case - 26 2023-01-08 Y case - 27 2023-01-08 N under_followup - 28 2023-01-09 N under_followup - 29 2023-01-09 Y case - 30 2023-01-13 Y case - 31 2023-01-10 N under_followup - 32 2023-01-09 N under_followup - 33 2023-01-15 N under_followup - 34 2023-01-14 N under_followup - 35 2023-01-10 Y case + 22 2023-01-03 N under_followup + 23 2023-01-03 N under_followup + 24 2023-01-04 Y case + 25 2023-01-04 N under_followup # sim_contacts works as expected with modified config parameters Code - sim_contacts(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_contacts(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, config = create_config(last_contact_distribution_params = c( lambda = 5))) Output - from to age sex date_first_contact - 1 Thao Yokota-Stroman Sammi Elizondo 62 f 2023-01-04 - 2 Thao Yokota-Stroman Audrey Ostrom 20 f 2023-01-07 - 3 Sammi Elizondo Ghaamid al-Abdallah 29 m 2023-01-08 - 4 Sammi Elizondo Faadil al-Toure 42 m 2023-01-05 - 5 Sammi Elizondo Tami Hicar 60 f 2023-01-03 - 6 Sammi Elizondo Kristin Gentry 65 f 2023-01-02 - 7 Faadil al-Toure Elias Schell 28 m 2023-01-04 - 8 Faadil al-Toure Stephanie Quezada 78 f 2023-01-01 - 9 Tami Hicar Alison Pham 31 f 2023-01-08 - 10 Tami Hicar Joe Martinez 12 m 2023-01-06 - 11 Tami Hicar Muneera al-Nazir 80 f 2023-01-04 - 12 Elias Schell Alea Butler 44 f 2023-01-01 - 13 Elias Schell Neal Amery 74 m 2023-01-03 - 14 Elias Schell Luis Mejia 26 m 2023-01-09 - 15 Elias Schell Awad el-Amara 33 m 2023-01-06 - 16 Elias Schell Joseph Plutt 4 m 2023-01-02 - 17 Alison Pham Cleevens Thrower 53 m 2023-01-08 - 18 Awad el-Amara James Smith Jr 86 m 2023-01-09 - 19 James Smith Jr Kalia Truong 89 f 2023-01-07 - 20 James Smith Jr Mary Weaver 24 f 2023-01-09 - 21 James Smith Jr Sydney Aguilar 37 f 2023-01-08 - 22 Sydney Aguilar Mariah Garcia 15 f 2023-01-09 - 23 Mariah Garcia Cade Gilbert 14 m 2023-01-07 - 24 Mariah Garcia Travis Roy 81 m 2023-01-09 - 25 Travis Roy Marc Xue 82 m 2023-01-09 - 26 Marc Xue Mathew Mcintire 72 m 2023-01-12 - 27 Marc Xue Steven Smith 53 m 2023-01-13 - 28 Marc Xue Cleevens Taylor 56 m 2023-01-07 - 29 Mathew Mcintire Saisuriya Wilson 71 m 2023-01-13 - 30 Mathew Mcintire Alejandro Lopez 50 m 2023-01-09 - 31 Mathew Mcintire Dakota Harvie 73 m 2023-01-08 - 32 Mathew Mcintire Nabeela al-Rahmani 20 f 2023-01-10 - 33 Saisuriya Wilson Jerry Williams 75 m 2023-01-17 - 34 Saisuriya Wilson Manaahil al-Ebrahim 2 f 2023-01-20 - 35 Alejandro Lopez Kelsey Mcclintock 3 f 2023-01-14 + from to age sex date_first_contact + 1 Barrington Johnson Nykalous Shumpert 51 m 2022-12-31 + 2 Barrington Johnson Alivia Perez 44 f 2023-01-02 + 3 Alivia Perez Arshad al-Basa 49 m 2023-01-05 + 4 Alivia Perez Madison Krause 60 f 2023-01-07 + 5 Alivia Perez Ashlan Allen 56 f 2023-01-01 + 6 Arshad al-Basa Turfa el-Farah 49 f 2023-01-06 + 7 Arshad al-Basa Ronald Welch 50 m 2023-01-04 + 8 Arshad al-Basa Simon Pickett 7 m 2023-01-05 + 9 Arshad al-Basa Destiny Hart 20 f 2023-01-05 + 10 Arshad al-Basa Jeramy Fitch 24 m 2023-01-04 + 11 Arshad al-Basa Joshua Ryckman 51 m 2023-01-05 + 12 Ronald Welch Adrian Wang 53 m 2023-01-04 + 13 Ronald Welch Luis Quintana 16 m 2023-01-04 + 14 Jeramy Fitch Janayva Ambrozic 83 f 2023-01-10 + 15 Jeramy Fitch Nicole Vazquez Pallares 2 f 2023-01-05 + 16 Jeramy Fitch Nusaiba al-Rassi 48 f 2023-01-04 + 17 Adrian Wang Korren Watts 65 f 2023-01-06 + 18 Janayva Ambrozic Shan Saldanha 44 f 2023-01-05 + 19 Janayva Ambrozic Jonathan Krishnan 77 m 2023-01-05 + 20 Janayva Ambrozic Alexander Brown 90 m 2023-01-05 + 21 Janayva Ambrozic Cruz Hernandez 66 m 2023-01-10 + 22 Nicole Vazquez Pallares Ryanna Vialpando 19 f 2023-01-06 + 23 Nusaiba al-Rassi Preston Miles 17 m 2022-12-31 + 24 Nusaiba al-Rassi Drue White 34 m 2023-01-04 + 25 Cruz Hernandez Breanna Crandall 75 f 2023-01-02 date_last_contact was_case status - 1 2023-01-07 Y case - 2 2023-01-10 N under_followup - 3 2023-01-11 N under_followup - 4 2023-01-06 Y case - 5 2023-01-05 Y case - 6 2023-01-05 N under_followup - 7 2023-01-06 Y case - 8 2023-01-07 Y case - 9 2023-01-11 Y case - 10 2023-01-08 N under_followup - 11 2023-01-06 N lost_to_followup - 12 2023-01-05 N under_followup - 13 2023-01-07 N lost_to_followup - 14 2023-01-10 N under_followup - 15 2023-01-07 Y case - 16 2023-01-06 N lost_to_followup - 17 2023-01-11 N under_followup - 18 2023-01-10 Y case - 19 2023-01-08 N under_followup - 20 2023-01-10 N lost_to_followup - 21 2023-01-10 Y case - 22 2023-01-10 Y case - 23 2023-01-09 N under_followup - 24 2023-01-10 Y case - 25 2023-01-11 Y case - 26 2023-01-13 Y case - 27 2023-01-16 N under_followup - 28 2023-01-11 N under_followup - 29 2023-01-13 Y case - 30 2023-01-12 Y case - 31 2023-01-13 N under_followup - 32 2023-01-12 N under_followup - 33 2023-01-17 N under_followup - 34 2023-01-21 N under_followup - 35 2023-01-16 Y case + 1 2023-01-04 N under_followup + 2 2023-01-03 Y case + 3 2023-01-08 Y case + 4 2023-01-10 N under_followup + 5 2023-01-09 N under_followup + 6 2023-01-09 N unknown + 7 2023-01-07 Y case + 8 2023-01-06 Y case + 9 2023-01-09 N lost_to_followup + 10 2023-01-07 Y case + 11 2023-01-08 N under_followup + 12 2023-01-06 Y case + 13 2023-01-06 N under_followup + 14 2023-01-13 Y case + 15 2023-01-08 Y case + 16 2023-01-05 Y case + 17 2023-01-06 N under_followup + 18 2023-01-08 N under_followup + 19 2023-01-11 N unknown + 20 2023-01-08 N lost_to_followup + 21 2023-01-13 Y case + 22 2023-01-09 N under_followup + 23 2023-01-07 N under_followup + 24 2023-01-07 Y case + 25 2023-01-06 N under_followup # sim_contacts works as expected with age structure Code - sim_contacts(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_contacts(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, population_age = age_struct) Output - from to age sex date_first_contact - 1 Shelbi Vitry Kathryn Lapitan 76 f 2023-01-02 - 2 Shelbi Vitry Larissa Wisham 65 f 2023-01-04 - 3 Kathryn Lapitan Preston Miller 35 m 2023-01-05 - 4 Kathryn Lapitan Derek Choi 9 m 2023-01-03 - 5 Kathryn Lapitan Chloe Moreno-Ferrel 89 f 2023-01-02 - 6 Kathryn Lapitan Lisa Johnson 36 f 2022-12-31 - 7 Derek Choi Jacob Begay 16 m 2023-01-02 - 8 Derek Choi Mia Yokota-Stroman 82 f 2022-12-30 - 9 Chloe Moreno-Ferrel Deja Elizondo 27 f 2023-01-06 - 10 Chloe Moreno-Ferrel Jacob Glaub 35 m 2023-01-04 - 11 Chloe Moreno-Ferrel Shandre Ostrom 2 f 2023-01-03 - 12 Jacob Begay Kylie Hicar 6 f 2022-12-30 - 13 Jacob Begay Woo Bin Park 23 m 2023-01-01 - 14 Jacob Begay Jayson Brooks 90 m 2023-01-07 - 15 Jacob Begay Mario Jones 47 m 2023-01-04 - 16 Jacob Begay Tai Ali 64 m 2022-12-31 - 17 Deja Elizondo Ronald Burgdorff 16 m 2023-01-06 - 18 Mario Jones Rodrigo Leal 85 m 2023-01-06 - 19 Rodrigo Leal Kelia Gentry 42 f 2023-01-05 - 20 Rodrigo Leal Ana Romero 26 f 2023-01-07 - 21 Rodrigo Leal Thao Pham 57 f 2023-01-06 - 22 Thao Pham Nabeela al-Nazir 89 f 2023-01-07 - 23 Nabeela al-Nazir David Nguyen 21 m 2023-01-06 - 24 Nabeela al-Nazir Joshua Valeta 90 m 2023-01-07 - 25 Joshua Valeta Evan Browne 48 m 2023-01-07 - 26 Evan Browne Jordan Brown 62 m 2023-01-10 - 27 Evan Browne Leighton Chun 20 m 2023-01-10 - 28 Evan Browne Raymond Martinez 4 m 2023-01-05 - 29 Jordan Brown Jalen Thrower 9 m 2023-01-11 - 30 Jordan Brown Cleevens Smith Jr 29 m 2023-01-08 - 31 Jordan Brown Saleel el-Dada 32 m 2023-01-07 - 32 Jordan Brown Lashon Butler 82 f 2023-01-08 - 33 Jalen Thrower Suhail al-Abdallah 75 m 2023-01-15 - 34 Jalen Thrower Alison Truong 2 f 2023-01-17 - 35 Cleevens Smith Jr Emma Weaver 79 f 2023-01-12 - date_last_contact was_case status - 1 2023-01-05 Y case - 2 2023-01-07 N under_followup - 3 2023-01-08 N under_followup - 4 2023-01-04 Y case - 5 2023-01-04 Y case - 6 2023-01-03 N under_followup - 7 2023-01-04 Y case - 8 2023-01-05 Y case - 9 2023-01-09 Y case - 10 2023-01-06 N under_followup - 11 2023-01-05 N lost_to_followup - 12 2023-01-03 N under_followup - 13 2023-01-05 N under_followup - 14 2023-01-08 N unknown - 15 2023-01-05 Y case - 16 2023-01-04 N lost_to_followup - 17 2023-01-09 N under_followup - 18 2023-01-07 Y case - 19 2023-01-06 N lost_to_followup - 20 2023-01-08 N under_followup - 21 2023-01-08 Y case - 22 2023-01-08 Y case - 23 2023-01-08 N under_followup - 24 2023-01-08 Y case - 25 2023-01-09 Y case - 26 2023-01-11 Y case - 27 2023-01-13 N under_followup - 28 2023-01-09 N under_followup - 29 2023-01-11 Y case - 30 2023-01-11 Y case - 31 2023-01-12 N lost_to_followup - 32 2023-01-10 N under_followup - 33 2023-01-15 N lost_to_followup - 34 2023-01-18 N under_followup - 35 2023-01-14 Y case + from to age sex date_first_contact + 1 Ramon Burch Job Cabrera 62 m 2022-12-30 + 2 Ramon Burch Raihaana el-Irani 24 f 2023-01-01 + 3 Raihaana el-Irani Joshua Puckett 52 m 2023-01-02 + 4 Raihaana el-Irani Katherine Benjamin 74 f 2023-01-04 + 5 Raihaana el-Irani Destiny Cornejo 76 f 2022-12-29 + 6 Joshua Puckett Ashleigh Contreras 26 f 2023-01-03 + 7 Joshua Puckett Miguel Maldonado 25 m 2023-01-02 + 8 Joshua Puckett Christian Siewiyumptewa 69 m 2023-01-03 + 9 Joshua Puckett Lilliana Garcia 53 f 2023-01-02 + 10 Joshua Puckett Diego Trevino 19 m 2023-01-02 + 11 Joshua Puckett Eric Tat 49 m 2023-01-03 + 12 Miguel Maldonado Robert Drazkowski 68 m 2023-01-02 + 13 Miguel Maldonado Chumron Lummis 82 m 2023-01-02 + 14 Diego Trevino Mufeeda el-Ozer 84 f 2023-01-07 + 15 Diego Trevino Carina Beltran 79 f 2023-01-02 + 16 Diego Trevino Tiffanie Falcon 5 f 2023-01-03 + 17 Robert Drazkowski Hannah Zhang Cheung 78 f 2023-01-04 + 18 Mufeeda el-Ozer Rebeca Chavez 85 f 2023-01-03 + 19 Mufeeda el-Ozer Hyungu Han 36 m 2023-01-03 + 20 Mufeeda el-Ozer Matthew Silevani 62 m 2023-01-03 + 21 Mufeeda el-Ozer Jesse-Reese Burukie 66 m 2023-01-07 + 22 Carina Beltran Johannah Costa 43 f 2023-01-04 + 23 Tiffanie Falcon Austin Pinch 61 m 2022-12-29 + 24 Tiffanie Falcon Neil Dorado 26 m 2023-01-03 + 25 Jesse-Reese Burukie Ruby Gaspar 81 f 2022-12-31 + date_last_contact was_case status + 1 2023-01-03 N under_followup + 2 2023-01-02 Y case + 3 2023-01-05 Y case + 4 2023-01-07 N under_followup + 5 2023-01-06 N under_followup + 6 2023-01-06 N under_followup + 7 2023-01-05 Y case + 8 2023-01-04 Y case + 9 2023-01-06 N under_followup + 10 2023-01-05 Y case + 11 2023-01-06 N unknown + 12 2023-01-04 Y case + 13 2023-01-04 N under_followup + 14 2023-01-10 Y case + 15 2023-01-05 Y case + 16 2023-01-04 Y case + 17 2023-01-04 N under_followup + 18 2023-01-06 N unknown + 19 2023-01-09 N under_followup + 20 2023-01-06 N under_followup + 21 2023-01-10 Y case + 22 2023-01-07 N under_followup + 23 2023-01-05 N under_followup + 24 2023-01-06 Y case + 25 2023-01-04 N under_followup diff --git a/tests/testthat/_snaps/sim_linelist.md b/tests/testthat/_snaps/sim_linelist.md index 4a66ed0a..bfc2e563 100644 --- a/tests/testthat/_snaps/sim_linelist.md +++ b/tests/testthat/_snaps/sim_linelist.md @@ -1,353 +1,273 @@ # sim_linelist works as expected Code - sim_linelist(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_linelist(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death) Output - id case_name case_type sex age date_onset date_admission - 1 1 Macella Moreland confirmed f 28 2023-01-01 - 2 2 Kayla Ellerman confirmed f 62 2023-01-02 2023-01-02 - 3 5 Matthew Biggerstaff confirmed m 42 2023-01-02 - 4 6 Vanessa Sihombing probable f 60 2023-01-03 - 5 8 Ross Mcclintock suspected m 28 2023-01-03 2023-01-05 - 6 9 Danielle Medero confirmed f 78 2023-01-03 - 7 10 Suhaa el-Saidi suspected f 31 2023-01-07 2023-01-19 - 8 16 Jakeob Wisham suspected m 33 2023-01-04 - 9 19 Shaahir el-Younis suspected m 86 2023-01-04 - 10 22 Arianna Bellomy confirmed f 37 2023-01-05 - 11 23 Angela Thompson probable f 15 2023-01-05 - 12 25 Irvin Quezada suspected m 81 2023-01-07 2023-01-08 - 13 26 Ronald Bliss probable m 82 2023-01-08 - 14 27 Andrew Truong probable m 72 2023-01-09 - 15 30 Dawson Wagner confirmed m 71 2023-01-12 - 16 31 Jacky Chen confirmed m 50 2023-01-10 - 17 36 Dewi Smith confirmed f 3 2023-01-10 - date_death date_first_contact date_last_contact ct_value - 1 23.6 - 2 2023-01-02 2023-01-05 23.6 - 3 2023-01-03 2023-01-04 23.6 - 4 2023-01-02 2023-01-04 NA - 5 2023-01-02 2023-01-04 NA - 6 2022-12-30 2023-01-05 23.6 - 7 2023-01-06 2023-01-09 NA - 8 2023-01-04 2023-01-05 NA - 9 2023-01-06 2023-01-07 NA - 10 2023-01-23 2023-01-06 2023-01-08 23.6 - 11 2023-01-07 2023-01-08 NA - 12 2023-01-07 2023-01-08 NA - 13 2023-01-07 2023-01-09 NA - 14 2023-01-10 2023-01-11 NA - 15 2023-01-11 2023-01-11 23.6 - 16 2023-01-08 2023-01-11 23.6 - 17 2023-01-12 2023-01-14 23.6 + id case_name case_type sex age date_onset date_admission date_death + 1 1 Joshua Esparza confirmed m 71 2023-01-01 + 2 3 Alyshah Atkins confirmed f 44 2023-01-02 2023-01-24 + 3 4 Rifat al-Mussa suspected m 49 2023-01-02 2023-01-03 + 4 8 Zachery Miramontes probable m 50 2023-01-02 + 5 9 Ryan Zahn probable m 7 2023-01-02 + 6 11 Bruce Hishinuma confirmed m 24 2023-01-02 2023-01-12 + 7 13 Dennison Duvall suspected m 53 2023-01-03 + 8 15 Mary Silva probable f 83 2023-01-03 + 9 16 Sage Thielke confirmed f 2 2023-01-03 + 10 17 Stephany Botello suspected f 48 2023-01-03 + 11 22 Taylor Hendon probable m 66 2023-01-03 + 12 25 Chengleng Chun confirmed m 34 2023-01-04 2023-01-08 + date_first_contact date_last_contact ct_value + 1 25.2 + 2 2023-01-01 2023-01-02 25.2 + 3 2023-01-02 2023-01-05 NA + 4 2023-01-02 2023-01-05 NA + 5 2023-01-03 2023-01-04 NA + 6 2023-01-02 2023-01-05 25.2 + 7 2023-01-02 2023-01-04 NA + 8 2023-01-07 2023-01-10 NA + 9 2023-01-02 2023-01-05 25.2 + 10 2023-01-03 2023-01-04 NA + 11 2023-01-07 2023-01-10 NA + 12 2023-01-03 2023-01-06 25.2 # sim_linelist works as expected with age-strat risks Code - sim_linelist(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_linelist(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, hosp_risk = age_dep_hosp_risk, hosp_death_risk = age_dep_hosp_death_risk, non_hosp_death_risk = age_dep_non_hosp_death_risk) Output - id case_name case_type sex age date_onset date_admission date_death - 1 1 Rachael Sneesby confirmed f 28 2023-01-01 - 2 2 Nadia Hill confirmed f 62 2023-01-02 2023-01-02 2023-01-07 - 3 5 Jonathan Huynh probable m 42 2023-01-02 - 4 6 Tharwa al-Amber probable f 60 2023-01-03 - 5 8 Ian Sanchez suspected m 28 2023-01-03 - 6 9 Sadie Ross confirmed f 78 2023-01-03 - 7 10 Jordan Marquardt suspected f 31 2023-01-07 - 8 16 Joseph Sky suspected m 33 2023-01-04 - 9 19 Geoffrey Boon confirmed m 86 2023-01-04 - 10 22 Juyoung Sands suspected f 37 2023-01-05 - 11 23 Mya Hunt suspected f 15 2023-01-05 - 12 25 Josef Fortes probable m 81 2023-01-07 2023-01-08 2023-01-29 - 13 26 Badri el-Hoque confirmed m 82 2023-01-08 - 14 27 William Jones probable m 72 2023-01-09 - 15 30 Luis Arreola confirmed m 71 2023-01-12 - 16 31 Zachary Abeyta probable m 50 2023-01-10 - 17 36 Shawnesse Smith suspected f 3 2023-01-10 + id case_name case_type sex age date_onset date_admission date_death + 1 1 Sean Depoyster suspected m 71 2023-01-01 + 2 3 Selena Hernandez suspected f 44 2023-01-02 2023-01-03 2023-01-15 + 3 4 Khairi al-Gaber confirmed m 49 2023-01-02 2023-01-14 + 4 8 Braxton Lindsey probable m 50 2023-01-02 + 5 9 Albert Nguyen suspected m 7 2023-01-02 + 6 11 Keili Ketchum suspected m 24 2023-01-02 + 7 13 Daniel Hemsouvanh confirmed m 53 2023-01-03 + 8 15 Natalie Montez confirmed f 83 2023-01-03 2023-01-05 2023-01-13 + 9 16 Morgan Williams suspected f 2 2023-01-03 2023-01-05 2023-01-10 + 10 17 Briana Greene-King confirmed f 48 2023-01-03 + 11 22 Dominick Maker suspected m 66 2023-01-03 + 12 25 Carl Levi Lee confirmed m 34 2023-01-04 date_first_contact date_last_contact ct_value - 1 24.3 - 2 2023-01-02 2023-01-05 24.3 - 3 2023-01-03 2023-01-04 NA - 4 2023-01-02 2023-01-04 NA - 5 2023-01-02 2023-01-04 NA - 6 2022-12-30 2023-01-05 24.3 - 7 2023-01-06 2023-01-09 NA - 8 2023-01-04 2023-01-05 NA - 9 2023-01-06 2023-01-07 24.3 - 10 2023-01-06 2023-01-08 NA - 11 2023-01-07 2023-01-08 NA - 12 2023-01-07 2023-01-08 NA - 13 2023-01-07 2023-01-09 24.3 - 14 2023-01-10 2023-01-11 NA - 15 2023-01-11 2023-01-11 24.3 - 16 2023-01-08 2023-01-11 NA - 17 2023-01-12 2023-01-14 NA + 1 NA + 2 2023-01-01 2023-01-02 NA + 3 2023-01-02 2023-01-05 25.1 + 4 2023-01-02 2023-01-05 NA + 5 2023-01-03 2023-01-04 NA + 6 2023-01-02 2023-01-05 NA + 7 2023-01-02 2023-01-04 25.1 + 8 2023-01-07 2023-01-10 25.1 + 9 2023-01-02 2023-01-05 NA + 10 2023-01-03 2023-01-04 25.1 + 11 2023-01-07 2023-01-10 NA + 12 2023-01-03 2023-01-06 25.1 # sim_linelist works as expected without Ct Code - sim_linelist(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_linelist(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, add_ct = FALSE) Output - id case_name case_type sex age date_onset date_admission - 1 1 Macella Moreland confirmed f 28 2023-01-01 - 2 2 Kayla Ellerman confirmed f 62 2023-01-02 2023-01-02 - 3 5 Matthew Biggerstaff confirmed m 42 2023-01-02 - 4 6 Vanessa Sihombing probable f 60 2023-01-03 - 5 8 Ross Mcclintock suspected m 28 2023-01-03 2023-01-05 - 6 9 Danielle Medero confirmed f 78 2023-01-03 - 7 10 Suhaa el-Saidi suspected f 31 2023-01-07 2023-01-19 - 8 16 Jakeob Wisham suspected m 33 2023-01-04 - 9 19 Shaahir el-Younis suspected m 86 2023-01-04 - 10 22 Arianna Bellomy confirmed f 37 2023-01-05 - 11 23 Angela Thompson probable f 15 2023-01-05 - 12 25 Irvin Quezada suspected m 81 2023-01-07 2023-01-08 - 13 26 Ronald Bliss probable m 82 2023-01-08 - 14 27 Andrew Truong probable m 72 2023-01-09 - 15 30 Dawson Wagner confirmed m 71 2023-01-12 - 16 31 Jacky Chen confirmed m 50 2023-01-10 - 17 36 Dewi Smith confirmed f 3 2023-01-10 - date_death date_first_contact date_last_contact - 1 - 2 2023-01-02 2023-01-05 - 3 2023-01-03 2023-01-04 - 4 2023-01-02 2023-01-04 - 5 2023-01-02 2023-01-04 - 6 2022-12-30 2023-01-05 - 7 2023-01-06 2023-01-09 - 8 2023-01-04 2023-01-05 - 9 2023-01-06 2023-01-07 - 10 2023-01-23 2023-01-06 2023-01-08 - 11 2023-01-07 2023-01-08 - 12 2023-01-07 2023-01-08 - 13 2023-01-07 2023-01-09 - 14 2023-01-10 2023-01-11 - 15 2023-01-11 2023-01-11 - 16 2023-01-08 2023-01-11 - 17 2023-01-12 2023-01-14 + id case_name case_type sex age date_onset date_admission date_death + 1 1 Joshua Esparza confirmed m 71 2023-01-01 + 2 3 Alyshah Atkins confirmed f 44 2023-01-02 2023-01-24 + 3 4 Rifat al-Mussa suspected m 49 2023-01-02 2023-01-03 + 4 8 Zachery Miramontes probable m 50 2023-01-02 + 5 9 Ryan Zahn probable m 7 2023-01-02 + 6 11 Bruce Hishinuma confirmed m 24 2023-01-02 2023-01-12 + 7 13 Dennison Duvall suspected m 53 2023-01-03 + 8 15 Mary Silva probable f 83 2023-01-03 + 9 16 Sage Thielke confirmed f 2 2023-01-03 + 10 17 Stephany Botello suspected f 48 2023-01-03 + 11 22 Taylor Hendon probable m 66 2023-01-03 + 12 25 Chengleng Chun confirmed m 34 2023-01-04 2023-01-08 + date_first_contact date_last_contact + 1 + 2 2023-01-01 2023-01-02 + 3 2023-01-02 2023-01-05 + 4 2023-01-02 2023-01-05 + 5 2023-01-03 2023-01-04 + 6 2023-01-02 2023-01-05 + 7 2023-01-02 2023-01-04 + 8 2023-01-07 2023-01-10 + 9 2023-01-02 2023-01-05 + 10 2023-01-03 2023-01-04 + 11 2023-01-07 2023-01-10 + 12 2023-01-03 2023-01-06 # sim_linelist works as expected with anonymous Code - sim_linelist(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_linelist(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, add_names = FALSE) Output id case_type sex age date_onset date_admission date_death date_first_contact - 1 1 confirmed f 28 2023-01-01 - 2 2 confirmed f 62 2023-01-02 2023-01-02 2023-01-02 - 3 5 probable m 42 2023-01-02 2023-01-03 - 4 6 confirmed f 60 2023-01-03 2023-01-02 - 5 8 suspected m 28 2023-01-03 2023-01-05 2023-01-02 - 6 9 probable f 78 2023-01-03 2022-12-30 - 7 10 confirmed f 31 2023-01-07 2023-01-19 2023-01-06 - 8 16 confirmed m 33 2023-01-04 2023-01-04 - 9 19 confirmed m 86 2023-01-04 2023-01-06 - 10 22 suspected f 37 2023-01-05 2023-01-23 2023-01-06 - 11 23 confirmed f 15 2023-01-05 2023-01-07 - 12 25 probable m 81 2023-01-07 2023-01-08 2023-01-07 - 13 26 probable m 82 2023-01-08 2023-01-07 - 14 27 suspected m 72 2023-01-09 2023-01-10 - 15 30 probable m 71 2023-01-12 2023-01-11 - 16 31 confirmed m 50 2023-01-10 2023-01-08 - 17 36 suspected f 3 2023-01-10 2023-01-12 + 1 1 suspected m 71 2023-01-01 + 2 3 suspected f 44 2023-01-02 2023-01-24 2023-01-01 + 3 4 probable m 49 2023-01-02 2023-01-03 2023-01-02 + 4 8 confirmed m 50 2023-01-02 2023-01-02 + 5 9 probable m 7 2023-01-02 2023-01-03 + 6 11 suspected m 24 2023-01-02 2023-01-12 2023-01-02 + 7 13 confirmed m 53 2023-01-03 2023-01-02 + 8 15 confirmed f 83 2023-01-03 2023-01-07 + 9 16 suspected f 2 2023-01-03 2023-01-02 + 10 17 confirmed f 48 2023-01-03 2023-01-03 + 11 22 confirmed m 66 2023-01-03 2023-01-07 + 12 25 confirmed m 34 2023-01-04 2023-01-08 2023-01-03 date_last_contact ct_value - 1 25.7 - 2 2023-01-05 25.7 - 3 2023-01-04 NA - 4 2023-01-04 25.7 + 1 NA + 2 2023-01-02 NA + 3 2023-01-05 NA + 4 2023-01-05 24 5 2023-01-04 NA 6 2023-01-05 NA - 7 2023-01-09 25.7 - 8 2023-01-05 25.7 - 9 2023-01-07 25.7 - 10 2023-01-08 NA - 11 2023-01-08 25.7 - 12 2023-01-08 NA - 13 2023-01-09 NA - 14 2023-01-11 NA - 15 2023-01-11 NA - 16 2023-01-11 25.7 - 17 2023-01-14 NA + 7 2023-01-04 24 + 8 2023-01-10 24 + 9 2023-01-05 NA + 10 2023-01-04 24 + 11 2023-01-10 24 + 12 2023-01-06 24 # sim_linelist works as expected with age structure Code - sim_linelist(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_linelist(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, population_age = age_struct) Output - id case_name case_type sex age date_onset date_admission - 1 1 Molly Archuleta confirmed f 8 2023-01-01 - 2 2 Gracie Lorenz confirmed f 76 2023-01-02 2023-01-03 - 3 5 David Alexis confirmed m 9 2023-01-02 - 4 6 Jazmyn Trotter-Brown confirmed f 89 2023-01-03 2023-01-05 - 5 8 Jack Byers confirmed m 16 2023-01-03 2023-01-04 - 6 9 Janet Cortez confirmed f 82 2023-01-03 - 7 10 Angeling Das probable f 27 2023-01-07 - 8 16 Paul Collier probable m 47 2023-01-04 - 9 19 Shawn Bustos-Campos confirmed m 85 2023-01-04 2023-01-10 - 10 22 Fuaada al-Kanan suspected f 57 2023-01-05 - 11 23 Caitlin Reeves probable f 89 2023-01-05 - 12 25 Samuel Thacker confirmed m 90 2023-01-07 - 13 26 Kenneth Huggins suspected m 48 2023-01-08 - 14 27 Alonzo Foster confirmed m 62 2023-01-09 - 15 30 Wajeeb al-Jafri confirmed m 9 2023-01-12 - 16 31 Kyron Pollard confirmed m 29 2023-01-10 - 17 36 Quinasia Lewis probable f 79 2023-01-10 - date_death date_first_contact date_last_contact ct_value - 1 24.3 - 2 2023-01-02 2023-01-05 24.3 - 3 2023-01-03 2023-01-04 24.3 - 4 2023-01-02 2023-01-04 24.3 - 5 2023-01-02 2023-01-04 24.3 - 6 2022-12-30 2023-01-05 24.3 - 7 2023-01-06 2023-01-09 NA - 8 2023-01-04 2023-01-05 NA - 9 2023-01-06 2023-01-07 24.3 - 10 2023-01-06 2023-01-08 NA - 11 2023-01-07 2023-01-08 NA - 12 2023-01-07 2023-01-08 24.3 - 13 2023-01-07 2023-01-09 NA - 14 2023-01-10 2023-01-11 24.3 - 15 2023-01-11 2023-01-11 24.3 - 16 2023-01-08 2023-01-11 24.3 - 17 2023-01-12 2023-01-14 NA + id case_name case_type sex age date_onset date_admission date_death + 1 1 Cass Jumbo suspected m 13 2023-01-01 + 2 3 Stephanie Park probable f 24 2023-01-02 + 3 4 Joseph Orlowske confirmed m 52 2023-01-02 + 4 8 Hunter Saunders confirmed m 25 2023-01-02 + 5 9 Anthony Carr confirmed m 69 2023-01-02 2023-01-15 + 6 11 Thaamir al-Masood suspected m 19 2023-01-02 + 7 13 Riyaal al-Samra suspected m 68 2023-01-03 2023-01-04 + 8 15 Emily Rodriguez probable f 84 2023-01-03 + 9 16 Allyson Browne confirmed f 79 2023-01-03 + 10 17 Aneesa al-Malak confirmed f 5 2023-01-03 + 11 22 Jonah Sterling probable m 66 2023-01-03 + 12 25 Michael Lopez suspected m 26 2023-01-04 2023-01-07 + date_first_contact date_last_contact ct_value + 1 NA + 2 2023-01-01 2023-01-02 NA + 3 2023-01-02 2023-01-05 25.5 + 4 2023-01-02 2023-01-05 25.5 + 5 2023-01-03 2023-01-04 25.5 + 6 2023-01-02 2023-01-05 NA + 7 2023-01-02 2023-01-04 NA + 8 2023-01-07 2023-01-10 NA + 9 2023-01-02 2023-01-05 25.5 + 10 2023-01-03 2023-01-04 25.5 + 11 2023-01-07 2023-01-10 NA + 12 2023-01-03 2023-01-06 NA # sim_linelist works as expected with age-strat risks & age struct Code - sim_linelist(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_linelist(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, hosp_risk = age_dep_hosp_risk, population_age = age_struct) Output id case_name case_type sex age date_onset date_admission date_death - 1 1 Elvia Ramos-Salas confirmed f 8 2023-01-01 - 2 2 Izza al-Muhammed confirmed f 76 2023-01-02 - 3 5 Nicholas Oliver probable m 9 2023-01-02 - 4 6 Monique Payne probable f 89 2023-01-03 - 5 8 Nathan Yatsu confirmed m 16 2023-01-03 - 6 9 Musheera al-Dajani confirmed f 82 2023-01-03 2023-01-10 - 7 10 Cassidy Wilson suspected f 27 2023-01-07 - 8 16 Yinghan Sahani suspected m 47 2023-01-04 2023-01-16 - 9 19 Zane Vitry confirmed m 85 2023-01-04 - 10 22 Sarah Fejeran confirmed f 57 2023-01-05 - 11 23 Susan Watson confirmed f 89 2023-01-05 - 12 25 Tyler Begay confirmed m 90 2023-01-07 - 13 26 Jonathan Johnson confirmed m 48 2023-01-08 - 14 27 Daif al-Ebrahim probable m 62 2023-01-09 2023-01-10 - 15 30 David Simok suspected m 9 2023-01-12 - 16 31 Khameron Vu confirmed m 29 2023-01-10 - 17 36 Brittany Tillman suspected f 79 2023-01-10 + 1 1 Michaeli Apodaca confirmed m 13 2023-01-01 + 2 3 Rifqa al-Malak confirmed f 24 2023-01-02 2023-01-11 + 3 4 Dennis Wilson confirmed m 52 2023-01-02 + 4 8 Sad el-Ozer suspected m 25 2023-01-02 + 5 9 Tristan Cahill suspected m 69 2023-01-02 + 6 11 Treven Contreras probable m 19 2023-01-02 + 7 13 Tyler Beltran confirmed m 68 2023-01-03 + 8 15 Faseeha el-Dada confirmed f 84 2023-01-03 + 9 16 Brittany Rodriguez probable f 79 2023-01-03 + 10 17 Lauren Williams suspected f 5 2023-01-03 + 11 22 Alex Stilwell probable m 66 2023-01-03 + 12 25 Jacob Howlingwolf confirmed m 26 2023-01-04 date_first_contact date_last_contact ct_value - 1 26.8 - 2 2023-01-02 2023-01-05 26.8 - 3 2023-01-03 2023-01-04 NA - 4 2023-01-02 2023-01-04 NA - 5 2023-01-02 2023-01-04 26.8 - 6 2022-12-30 2023-01-05 26.8 - 7 2023-01-06 2023-01-09 NA - 8 2023-01-04 2023-01-05 NA - 9 2023-01-06 2023-01-07 26.8 - 10 2023-01-06 2023-01-08 26.8 - 11 2023-01-07 2023-01-08 26.8 - 12 2023-01-07 2023-01-08 26.8 - 13 2023-01-07 2023-01-09 26.8 - 14 2023-01-10 2023-01-11 NA - 15 2023-01-11 2023-01-11 NA - 16 2023-01-08 2023-01-11 26.8 - 17 2023-01-12 2023-01-14 NA + 1 25.4 + 2 2023-01-01 2023-01-02 25.4 + 3 2023-01-02 2023-01-05 25.4 + 4 2023-01-02 2023-01-05 NA + 5 2023-01-03 2023-01-04 NA + 6 2023-01-02 2023-01-05 NA + 7 2023-01-02 2023-01-04 25.4 + 8 2023-01-07 2023-01-10 25.4 + 9 2023-01-02 2023-01-05 NA + 10 2023-01-03 2023-01-04 NA + 11 2023-01-07 2023-01-10 NA + 12 2023-01-03 2023-01-06 25.4 # sim_linelist works as expected with modified config Code - sim_linelist(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_linelist(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, config = create_config(last_contact_distribution = "geom", last_contact_distribution_params = c(prob = 0.5))) Output - id case_name case_type sex age date_onset date_admission date_death - 1 1 Michelle Gonzales confirmed f 75 2023-01-01 - 2 2 Melanie Shaffer confirmed f 2 2023-01-02 - 3 5 Artrielle Webb confirmed f 15 2023-01-02 2023-01-03 - 4 6 Casey Tucson suspected f 28 2023-01-03 2023-01-17 - 5 8 John Yanushonis suspected m 69 2023-01-03 - 6 9 Carli Burciaga probable f 78 2023-01-03 - 7 10 Saalih al-Islam suspected m 37 2023-01-07 - 8 16 Daif al-Awan probable m 83 2023-01-04 - 9 19 Chanise Armstrong confirmed f 68 2023-01-04 2023-01-09 2023-01-12 - 10 22 Dalene Charlie suspected f 52 2023-01-05 - 11 23 Trent Atkinson confirmed m 80 2023-01-05 - 12 25 Shandel Shreve confirmed f 35 2023-01-07 2023-01-07 - 13 26 Antonio Spradley confirmed m 74 2023-01-08 - 14 27 William Oster probable m 70 2023-01-09 - 15 30 Hannah Hicks probable f 49 2023-01-12 - 16 31 Sara Broomand suspected f 87 2023-01-10 - 17 36 Keith Henningsen confirmed m 13 2023-01-10 + id case_name case_type sex age date_onset date_admission date_death + 1 1 Irfaan al-Masood suspected m 35 2023-01-01 + 2 3 Cody Lovelace confirmed m 19 2023-01-02 2023-01-05 + 3 4 Natalie Vasquez suspected f 75 2023-01-02 2023-01-03 + 4 8 Mushtaaq al-Rahimi confirmed m 50 2023-01-02 + 5 9 Selena Anaya probable f 24 2023-01-02 + 6 11 Shaamila al-Shahan probable f 79 2023-01-02 + 7 13 Briana Ford probable f 39 2023-01-03 2023-01-03 + 8 15 Keili Huff confirmed m 12 2023-01-03 + 9 16 Iliana Archuleta confirmed f 14 2023-01-03 + 10 17 Ceara Directo confirmed f 16 2023-01-03 + 11 22 Daniel Kuch probable m 73 2023-01-03 + 12 25 Trey-Logan Raymond confirmed m 5 2023-01-04 date_first_contact date_last_contact ct_value - 1 24 - 2 2022-12-31 2023-01-01 24 - 3 2023-01-01 2023-01-02 24 - 4 2022-12-31 2023-01-05 NA - 5 2022-12-31 2023-01-02 NA - 6 2022-12-31 2023-01-03 NA - 7 2023-01-02 2023-01-03 NA - 8 2023-01-01 2023-01-03 NA - 9 2022-12-30 2023-01-05 24 - 10 2023-01-02 2023-01-04 NA - 11 2023-01-02 2023-01-06 24 - 12 2023-01-05 2023-01-07 24 - 13 2023-01-05 2023-01-07 24 - 14 2023-01-04 2023-01-08 NA - 15 2023-01-06 2023-01-09 NA - 16 2023-01-12 2023-01-13 NA - 17 2023-01-07 2023-01-10 24 + 1 NA + 2 2022-12-27 2023-01-01 26 + 3 2023-01-01 2023-01-04 NA + 4 2023-01-02 2023-01-03 26 + 5 2023-01-01 2023-01-03 NA + 6 2022-12-31 2023-01-02 NA + 7 2022-12-29 2023-01-03 NA + 8 2022-12-31 2023-01-02 26 + 9 2022-12-31 2023-01-02 26 + 10 2022-12-29 2023-01-03 26 + 11 2023-01-02 2023-01-04 NA + 12 2023-01-01 2023-01-04 26 # sim_linelist works as expected with modified config parameters Code - sim_linelist(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_linelist(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, config = create_config(last_contact_distribution_params = c(lambda = 5))) Output - id case_name case_type sex age date_onset date_admission - 1 1 Macella Moreland confirmed f 28 2023-01-01 - 2 2 Kayla Ellerman confirmed f 62 2023-01-02 2023-01-02 - 3 5 Matthew Biggerstaff confirmed m 42 2023-01-02 - 4 6 Vanessa Sihombing probable f 60 2023-01-03 - 5 8 Ross Mcclintock suspected m 28 2023-01-03 2023-01-05 - 6 9 Danielle Medero confirmed f 78 2023-01-03 - 7 10 Suhaa el-Saidi suspected f 31 2023-01-07 2023-01-19 - 8 16 Jakeob Wisham suspected m 33 2023-01-04 - 9 19 Shaahir el-Younis suspected m 86 2023-01-04 - 10 22 Arianna Bellomy confirmed f 37 2023-01-05 - 11 23 Angela Thompson probable f 15 2023-01-05 - 12 25 Irvin Quezada suspected m 81 2023-01-07 2023-01-08 - 13 26 Ronald Bliss probable m 82 2023-01-08 - 14 27 Andrew Truong probable m 72 2023-01-09 - 15 30 Dawson Wagner confirmed m 71 2023-01-12 - 16 31 Jacky Chen confirmed m 50 2023-01-10 - 17 36 Dewi Smith confirmed f 3 2023-01-10 - date_death date_first_contact date_last_contact ct_value - 1 23.6 - 2 2023-01-04 2023-01-07 23.6 - 3 2023-01-05 2023-01-06 23.6 - 4 2023-01-03 2023-01-05 NA - 5 2023-01-04 2023-01-06 NA - 6 2023-01-01 2023-01-07 23.6 - 7 2023-01-08 2023-01-11 NA - 8 2023-01-06 2023-01-07 NA - 9 2023-01-09 2023-01-10 NA - 10 2023-01-23 2023-01-08 2023-01-10 23.6 - 11 2023-01-09 2023-01-10 NA - 12 2023-01-09 2023-01-10 NA - 13 2023-01-09 2023-01-11 NA - 14 2023-01-12 2023-01-13 NA - 15 2023-01-13 2023-01-13 23.6 - 16 2023-01-09 2023-01-12 23.6 - 17 2023-01-14 2023-01-16 23.6 + id case_name case_type sex age date_onset date_admission date_death + 1 1 Joshua Esparza confirmed m 71 2023-01-01 + 2 3 Alyshah Atkins confirmed f 44 2023-01-02 2023-01-24 + 3 4 Rifat al-Mussa suspected m 49 2023-01-02 2023-01-03 + 4 8 Zachery Miramontes probable m 50 2023-01-02 + 5 9 Ryan Zahn probable m 7 2023-01-02 + 6 11 Bruce Hishinuma confirmed m 24 2023-01-02 2023-01-12 + 7 13 Dennison Duvall suspected m 53 2023-01-03 + 8 15 Mary Silva probable f 83 2023-01-03 + 9 16 Sage Thielke confirmed f 2 2023-01-03 + 10 17 Stephany Botello suspected f 48 2023-01-03 + 11 22 Taylor Hendon probable m 66 2023-01-03 + 12 25 Chengleng Chun confirmed m 34 2023-01-04 2023-01-08 + date_first_contact date_last_contact ct_value + 1 25.2 + 2 2023-01-02 2023-01-03 25.2 + 3 2023-01-05 2023-01-08 NA + 4 2023-01-04 2023-01-07 NA + 5 2023-01-05 2023-01-06 NA + 6 2023-01-04 2023-01-07 25.2 + 7 2023-01-04 2023-01-06 NA + 8 2023-01-10 2023-01-13 NA + 9 2023-01-05 2023-01-08 25.2 + 10 2023-01-04 2023-01-05 NA + 11 2023-01-10 2023-01-13 NA + 12 2023-01-04 2023-01-07 25.2 diff --git a/tests/testthat/_snaps/sim_network_bp.md b/tests/testthat/_snaps/sim_network_bp.md index 70531081..2444d77e 100644 --- a/tests/testthat/_snaps/sim_network_bp.md +++ b/tests/testthat/_snaps/sim_network_bp.md @@ -1,25 +1,41 @@ # .sim_network_bp works as expected Code - .sim_network_bp(contact_distribution = contact_distribution, contact_interval = contact_interval, + .sim_network_bp(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, max_outbreak_size = 10000, config = create_config()) Output id ancestor generation infected time 1 1 NA 1 infected 0.000000 - 2 2 1 2 contact 1.882402 - 3 3 1 2 infected 1.804512 - 4 4 3 3 infected 1.863476 - 5 5 3 3 contact 2.962868 - 6 6 3 3 contact 2.794532 - 7 7 4 4 infected 4.003837 - 8 8 7 5 contact 4.473719 - 9 9 7 5 contact 4.698090 - 10 10 7 5 contact 4.072034 + 2 2 1 2 contact 1.691130 + 3 3 1 2 infected 1.778258 + 4 4 3 3 infected 1.823650 + 5 5 3 3 contact 1.807604 + 6 6 3 3 contact 1.820571 + 7 7 4 4 contact 1.883762 + 8 8 4 4 infected 1.960367 + 9 9 4 4 infected 1.877154 + 10 10 4 4 contact 1.899434 + 11 11 4 4 infected 1.917903 + 12 12 4 4 contact 1.901236 + 13 13 8 5 infected 2.787989 + 14 14 8 5 contact 2.612689 + 15 15 11 5 infected 2.505053 + 16 16 11 5 infected 2.818889 + 17 17 11 5 infected 2.770190 + 18 18 13 6 contact 3.967263 + 19 19 15 6 contact 2.517370 + 20 20 15 6 contact 2.633031 + 21 21 15 6 contact 2.554628 + 22 22 15 6 infected 2.627785 + 23 23 16 6 contact 3.028413 + 24 24 17 6 contact 4.562579 + 25 25 17 6 infected 3.776408 + 26 26 22 7 contact 2.866176 # .sim_network_bp works as expected with no contacts Code - .sim_network_bp(contact_distribution = contact_distribution, contact_interval = contact_interval, + .sim_network_bp(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, max_outbreak_size = 10000, config = create_config()) Output id ancestor generation infected time @@ -28,18 +44,34 @@ # .sim_network_bp works as expected with unadjusted network Code - .sim_network_bp(contact_distribution = contact_distribution, contact_interval = contact_interval, + .sim_network_bp(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, max_outbreak_size = 10000, config = create_config(network = "unadjusted")) Output id ancestor generation infected time 1 1 NA 1 infected 0.000000 - 2 2 1 2 contact 1.882402 - 3 3 1 2 infected 1.804512 - 4 4 3 3 infected 1.863476 - 5 5 3 3 contact 2.962868 - 6 6 3 3 contact 2.794532 - 7 7 4 4 infected 4.003837 - 8 8 7 5 contact 4.473719 - 9 9 7 5 contact 4.698090 - 10 10 7 5 contact 4.072034 + 2 2 1 2 contact 1.691130 + 3 3 1 2 infected 1.778258 + 4 4 3 3 infected 1.823650 + 5 5 3 3 contact 1.807604 + 6 6 3 3 contact 1.820571 + 7 7 4 4 contact 1.883762 + 8 8 4 4 infected 1.960367 + 9 9 4 4 infected 1.877154 + 10 10 4 4 contact 1.899434 + 11 11 4 4 infected 1.917903 + 12 12 4 4 contact 1.901236 + 13 13 8 5 infected 2.787989 + 14 14 8 5 contact 2.612689 + 15 15 11 5 infected 2.505053 + 16 16 11 5 infected 2.818889 + 17 17 11 5 infected 2.770190 + 18 18 13 6 contact 3.967263 + 19 19 15 6 contact 2.517370 + 20 20 15 6 contact 2.633031 + 21 21 15 6 contact 2.554628 + 22 22 15 6 infected 2.627785 + 23 23 16 6 contact 3.028413 + 24 24 17 6 contact 4.562579 + 25 25 17 6 infected 3.776408 + 26 26 22 7 contact 2.866176 diff --git a/tests/testthat/_snaps/sim_outbreak.md b/tests/testthat/_snaps/sim_outbreak.md index 0a980119..f425e0d9 100644 --- a/tests/testthat/_snaps/sim_outbreak.md +++ b/tests/testthat/_snaps/sim_outbreak.md @@ -1,480 +1,360 @@ # sim_outbreak works as expected Code - sim_outbreak(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_outbreak(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death) Output $linelist - id case_name case_type sex age date_onset date_admission - 1 1 Macella Moreland confirmed f 28 2023-01-01 - 2 2 Kayla Ellerman confirmed f 62 2023-01-02 2023-01-02 - 3 5 Matthew Biggerstaff confirmed m 42 2023-01-02 - 4 6 Vanessa Sihombing probable f 60 2023-01-03 - 5 8 Ross Mcclintock suspected m 28 2023-01-03 2023-01-05 - 6 9 Danielle Medero confirmed f 78 2023-01-03 - 7 10 Suhaa el-Saidi suspected f 31 2023-01-07 2023-01-19 - 8 16 Jakeob Wisham suspected m 33 2023-01-04 - 9 19 Shaahir el-Younis suspected m 86 2023-01-04 - 10 22 Arianna Bellomy confirmed f 37 2023-01-05 - 11 23 Angela Thompson probable f 15 2023-01-05 - 12 25 Irvin Quezada suspected m 81 2023-01-07 2023-01-08 - 13 26 Ronald Bliss probable m 82 2023-01-08 - 14 27 Andrew Truong probable m 72 2023-01-09 - 15 30 Dawson Wagner confirmed m 71 2023-01-12 - 16 31 Jacky Chen confirmed m 50 2023-01-10 - 17 36 Dewi Smith confirmed f 3 2023-01-10 - date_death date_first_contact date_last_contact ct_value - 1 23.6 - 2 2023-01-02 2023-01-05 23.6 - 3 2023-01-03 2023-01-04 23.6 - 4 2023-01-02 2023-01-04 NA - 5 2023-01-02 2023-01-04 NA - 6 2022-12-30 2023-01-05 23.6 - 7 2023-01-06 2023-01-09 NA - 8 2023-01-04 2023-01-05 NA - 9 2023-01-06 2023-01-07 NA - 10 2023-01-23 2023-01-06 2023-01-08 23.6 - 11 2023-01-07 2023-01-08 NA - 12 2023-01-07 2023-01-08 NA - 13 2023-01-07 2023-01-09 NA - 14 2023-01-10 2023-01-11 NA - 15 2023-01-11 2023-01-11 23.6 - 16 2023-01-08 2023-01-11 23.6 - 17 2023-01-12 2023-01-14 23.6 + id case_name case_type sex age date_onset date_admission date_death + 1 1 Joshua Esparza confirmed m 71 2023-01-01 + 2 3 Alyshah Atkins confirmed f 44 2023-01-02 2023-01-24 + 3 4 Rifat al-Mussa suspected m 49 2023-01-02 2023-01-03 + 4 8 Zachery Miramontes probable m 50 2023-01-02 + 5 9 Ryan Zahn probable m 7 2023-01-02 + 6 11 Bruce Hishinuma confirmed m 24 2023-01-02 2023-01-12 + 7 13 Dennison Duvall suspected m 53 2023-01-03 + 8 15 Mary Silva probable f 83 2023-01-03 + 9 16 Sage Thielke confirmed f 2 2023-01-03 + 10 17 Stephany Botello suspected f 48 2023-01-03 + 11 22 Taylor Hendon probable m 66 2023-01-03 + 12 25 Chengleng Chun confirmed m 34 2023-01-04 2023-01-08 + date_first_contact date_last_contact ct_value + 1 25.2 + 2 2023-01-01 2023-01-02 25.2 + 3 2023-01-02 2023-01-05 NA + 4 2023-01-02 2023-01-05 NA + 5 2023-01-03 2023-01-04 NA + 6 2023-01-02 2023-01-05 25.2 + 7 2023-01-02 2023-01-04 NA + 8 2023-01-07 2023-01-10 NA + 9 2023-01-02 2023-01-05 25.2 + 10 2023-01-03 2023-01-04 NA + 11 2023-01-07 2023-01-10 NA + 12 2023-01-03 2023-01-06 25.2 $contacts - from to age sex date_first_contact - 1 Macella Moreland Kayla Ellerman 62 f 2023-01-02 - 2 Macella Moreland Juwairiya al-Saah 20 f 2023-01-04 - 3 Kayla Ellerman Ubaida el-Meer 29 m 2023-01-05 - 4 Kayla Ellerman Matthew Biggerstaff 42 m 2023-01-03 - 5 Kayla Ellerman Vanessa Sihombing 60 f 2023-01-02 - 6 Kayla Ellerman Joslyn Smith 65 f 2022-12-31 - 7 Matthew Biggerstaff Ross Mcclintock 28 m 2023-01-02 - 8 Matthew Biggerstaff Danielle Medero 78 f 2022-12-30 - 9 Vanessa Sihombing Suhaa el-Saidi 31 f 2023-01-06 - 10 Vanessa Sihombing Ethan Lapitan 12 m 2023-01-04 - 11 Vanessa Sihombing Amanda Day 80 f 2023-01-03 - 12 Ross Mcclintock Breianna Colson 44 f 2022-12-30 - 13 Ross Mcclintock Benjamin Yokota-Stroman 74 m 2023-01-01 - 14 Ross Mcclintock Austin Wilson 26 m 2023-01-07 - 15 Ross Mcclintock Jakeob Wisham 33 m 2023-01-04 - 16 Ross Mcclintock Victor Elizondo 4 m 2022-12-31 - 17 Suhaa el-Saidi Gustavo Hernandez 53 m 2023-01-06 - 18 Jakeob Wisham Shaahir el-Younis 86 m 2023-01-06 - 19 Shaahir el-Younis Chelsea Phoenix 89 f 2023-01-05 - 20 Shaahir el-Younis Kalina Siddiqui 24 f 2023-01-07 - 21 Shaahir el-Younis Arianna Bellomy 37 f 2023-01-06 - 22 Arianna Bellomy Angela Thompson 15 f 2023-01-07 - 23 Angela Thompson Daniel Pham 14 m 2023-01-06 - 24 Angela Thompson Irvin Quezada 81 m 2023-01-07 - 25 Irvin Quezada Ronald Bliss 82 m 2023-01-07 - 26 Ronald Bliss Andrew Truong 72 m 2023-01-10 - 27 Ronald Bliss Dillan Aguilar 53 m 2023-01-10 - 28 Ronald Bliss Andres Garza 56 m 2023-01-05 - 29 Andrew Truong Dawson Wagner 71 m 2023-01-11 - 30 Andrew Truong Jacky Chen 50 m 2023-01-08 - 31 Andrew Truong Ignacio Gentry 73 m 2023-01-07 - 32 Andrew Truong Tessa Yang 20 f 2023-01-08 - 33 Dawson Wagner Jair Garcia 75 m 2023-01-15 - 34 Dawson Wagner Monique Lau 2 f 2023-01-17 - 35 Jacky Chen Dewi Smith 3 f 2023-01-12 + from to age sex date_first_contact + 1 Joshua Esparza Victor Sisk 51 m 2022-12-30 + 2 Joshua Esparza Alyshah Atkins 44 f 2023-01-01 + 3 Alyshah Atkins Rifat al-Mussa 49 m 2023-01-02 + 4 Alyshah Atkins Aaliyah Mascotti 60 f 2023-01-04 + 5 Alyshah Atkins Silbret Locks 56 f 2022-12-29 + 6 Rifat al-Mussa Alyssa Yohe-Ironwing 49 f 2023-01-03 + 7 Rifat al-Mussa Zachery Miramontes 50 m 2023-01-02 + 8 Rifat al-Mussa Ryan Zahn 7 m 2023-01-03 + 9 Rifat al-Mussa Sofia Lara Gomez 20 f 2023-01-02 + 10 Rifat al-Mussa Bruce Hishinuma 24 m 2023-01-02 + 11 Rifat al-Mussa Lucas Tafoya 51 m 2023-01-03 + 12 Zachery Miramontes Dennison Duvall 53 m 2023-01-02 + 13 Zachery Miramontes Luis Torres 16 m 2023-01-02 + 14 Bruce Hishinuma Mary Silva 83 f 2023-01-07 + 15 Bruce Hishinuma Sage Thielke 2 f 2023-01-02 + 16 Bruce Hishinuma Stephany Botello 48 f 2023-01-03 + 17 Dennison Duvall Rebecca Jenkins 65 f 2023-01-04 + 18 Mary Silva Kaylin Casner 44 f 2023-01-03 + 19 Mary Silva Zameel el-Saab 77 m 2023-01-03 + 20 Mary Silva Zane Coronado-Romo 90 m 2023-01-03 + 21 Mary Silva Taylor Hendon 66 m 2023-01-07 + 22 Sage Thielke Sulama al-Farman 19 f 2023-01-04 + 23 Stephany Botello Raymundo Ramirez 17 m 2022-12-29 + 24 Stephany Botello Chengleng Chun 34 m 2023-01-03 + 25 Taylor Hendon Courtney Fackelman 75 f 2022-12-31 date_last_contact was_case status - 1 2023-01-05 Y case - 2 2023-01-07 N under_followup - 3 2023-01-08 N under_followup - 4 2023-01-04 Y case - 5 2023-01-04 Y case - 6 2023-01-03 N under_followup - 7 2023-01-04 Y case - 8 2023-01-05 Y case - 9 2023-01-09 Y case - 10 2023-01-06 N under_followup - 11 2023-01-05 N under_followup - 12 2023-01-03 N under_followup - 13 2023-01-05 N lost_to_followup - 14 2023-01-08 N lost_to_followup + 1 2023-01-03 N under_followup + 2 2023-01-02 Y case + 3 2023-01-05 Y case + 4 2023-01-07 N under_followup + 5 2023-01-06 N unknown + 6 2023-01-06 N lost_to_followup + 7 2023-01-05 Y case + 8 2023-01-04 Y case + 9 2023-01-06 N under_followup + 10 2023-01-05 Y case + 11 2023-01-06 N under_followup + 12 2023-01-04 Y case + 13 2023-01-04 N lost_to_followup + 14 2023-01-10 Y case 15 2023-01-05 Y case - 16 2023-01-04 N under_followup - 17 2023-01-09 N under_followup - 18 2023-01-07 Y case - 19 2023-01-06 N under_followup - 20 2023-01-08 N under_followup - 21 2023-01-08 Y case - 22 2023-01-08 Y case - 23 2023-01-08 N under_followup - 24 2023-01-08 Y case - 25 2023-01-09 Y case - 26 2023-01-11 Y case - 27 2023-01-13 N under_followup - 28 2023-01-09 N under_followup - 29 2023-01-11 Y case - 30 2023-01-11 Y case - 31 2023-01-12 N under_followup - 32 2023-01-10 N under_followup - 33 2023-01-15 N lost_to_followup - 34 2023-01-18 N under_followup - 35 2023-01-14 Y case + 16 2023-01-04 Y case + 17 2023-01-04 N under_followup + 18 2023-01-06 N lost_to_followup + 19 2023-01-09 N under_followup + 20 2023-01-06 N under_followup + 21 2023-01-10 Y case + 22 2023-01-07 N under_followup + 23 2023-01-05 N under_followup + 24 2023-01-06 Y case + 25 2023-01-04 N under_followup # sim_outbreak works as expected with add_names = FALSE Code - sim_outbreak(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_outbreak(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, add_names = FALSE) Output $linelist id case_type sex age date_onset date_admission date_death date_first_contact - 1 1 confirmed f 28 2023-01-01 - 2 2 confirmed f 62 2023-01-02 2023-01-02 2023-01-02 - 3 5 probable m 42 2023-01-02 2023-01-03 - 4 6 confirmed f 60 2023-01-03 2023-01-02 - 5 8 suspected m 28 2023-01-03 2023-01-05 2023-01-02 - 6 9 probable f 78 2023-01-03 2022-12-30 - 7 10 confirmed f 31 2023-01-07 2023-01-19 2023-01-06 - 8 16 confirmed m 33 2023-01-04 2023-01-04 - 9 19 confirmed m 86 2023-01-04 2023-01-06 - 10 22 suspected f 37 2023-01-05 2023-01-23 2023-01-06 - 11 23 confirmed f 15 2023-01-05 2023-01-07 - 12 25 probable m 81 2023-01-07 2023-01-08 2023-01-07 - 13 26 probable m 82 2023-01-08 2023-01-07 - 14 27 suspected m 72 2023-01-09 2023-01-10 - 15 30 probable m 71 2023-01-12 2023-01-11 - 16 31 confirmed m 50 2023-01-10 2023-01-08 - 17 36 suspected f 3 2023-01-10 2023-01-12 + 1 1 suspected m 71 2023-01-01 + 2 3 suspected f 44 2023-01-02 2023-01-24 2023-01-01 + 3 4 probable m 49 2023-01-02 2023-01-03 2023-01-02 + 4 8 confirmed m 50 2023-01-02 2023-01-02 + 5 9 probable m 7 2023-01-02 2023-01-03 + 6 11 suspected m 24 2023-01-02 2023-01-12 2023-01-02 + 7 13 confirmed m 53 2023-01-03 2023-01-02 + 8 15 confirmed f 83 2023-01-03 2023-01-07 + 9 16 suspected f 2 2023-01-03 2023-01-02 + 10 17 confirmed f 48 2023-01-03 2023-01-03 + 11 22 confirmed m 66 2023-01-03 2023-01-07 + 12 25 confirmed m 34 2023-01-04 2023-01-08 2023-01-03 date_last_contact ct_value - 1 25.7 - 2 2023-01-05 25.7 - 3 2023-01-04 NA - 4 2023-01-04 25.7 + 1 NA + 2 2023-01-02 NA + 3 2023-01-05 NA + 4 2023-01-05 24 5 2023-01-04 NA 6 2023-01-05 NA - 7 2023-01-09 25.7 - 8 2023-01-05 25.7 - 9 2023-01-07 25.7 - 10 2023-01-08 NA - 11 2023-01-08 25.7 - 12 2023-01-08 NA - 13 2023-01-09 NA - 14 2023-01-11 NA - 15 2023-01-11 NA - 16 2023-01-11 25.7 - 17 2023-01-14 NA + 7 2023-01-04 24 + 8 2023-01-10 24 + 9 2023-01-05 NA + 10 2023-01-04 24 + 11 2023-01-10 24 + 12 2023-01-06 24 $contacts - from to age sex date_first_contact - 1 Janae Gallegos Fat'hiyaa al-Ishak 62 f 2023-01-02 - 2 Janae Gallegos Rorie Wallace 20 f 2023-01-04 - 3 Fat'hiyaa al-Ishak Jose Archuleta 29 m 2023-01-05 - 4 Fat'hiyaa al-Ishak Jordan Mcclintock 42 m 2023-01-03 - 5 Fat'hiyaa al-Ishak Xeandra Watkins 60 f 2023-01-02 - 6 Fat'hiyaa al-Ishak Jenae Berhe 65 f 2022-12-31 - 7 Jordan Mcclintock Ranny Bajwa 28 m 2023-01-02 - 8 Jordan Mcclintock Ceara Pham 78 f 2022-12-30 - 9 Xeandra Watkins Sara Baldwin 31 f 2023-01-06 - 10 Xeandra Watkins Derek Pensoneau 12 m 2023-01-04 - 11 Xeandra Watkins Nikki Begay 80 f 2023-01-03 - 12 Ranny Bajwa Dewi Huynh 44 f 2022-12-30 - 13 Ranny Bajwa Luis Gutierrez 74 m 2023-01-01 - 14 Ranny Bajwa Kelvin Bliss 26 m 2023-01-07 - 15 Ranny Bajwa Matthew Som 33 m 2023-01-04 - 16 Ranny Bajwa Ian Hill 4 m 2022-12-31 - 17 Sara Baldwin Dakota Wagner 53 m 2023-01-06 - 18 Matthew Som Sean Kapushion 86 m 2023-01-06 - 19 Sean Kapushion Saranya Wiedmaier 89 f 2023-01-05 - 20 Sean Kapushion Han Mi Ngu 24 f 2023-01-07 - 21 Sean Kapushion Tenazia Whitaker 37 f 2023-01-06 - 22 Tenazia Whitaker Madeeha el-Nasir 15 f 2023-01-07 - 23 Madeeha el-Nasir Joseph John 14 m 2023-01-06 - 24 Madeeha el-Nasir Jacob Montez 81 m 2023-01-07 - 25 Jacob Montez Jonathan Li 82 m 2023-01-07 - 26 Jonathan Li Hamood el-Meer 72 m 2023-01-10 - 27 Jonathan Li Giovanni Smith 53 m 2023-01-10 - 28 Jonathan Li Atif Huynh 56 m 2023-01-05 - 29 Hamood el-Meer Jonah Mahan 71 m 2023-01-11 - 30 Hamood el-Meer Chandler Gasca 50 m 2023-01-08 - 31 Hamood el-Meer Geoffrey Wisham 73 m 2023-01-07 - 32 Hamood el-Meer Jazmyn Pillow 20 f 2023-01-08 - 33 Jonah Mahan Rafeeq el-Younis 75 m 2023-01-15 - 34 Jonah Mahan Savannah Hawk 2 f 2023-01-17 - 35 Chandler Gasca Anna Chase 3 f 2023-01-12 - date_last_contact was_case status - 1 2023-01-05 Y case - 2 2023-01-07 N lost_to_followup - 3 2023-01-08 N under_followup - 4 2023-01-04 Y case - 5 2023-01-04 Y case - 6 2023-01-03 N under_followup - 7 2023-01-04 Y case - 8 2023-01-05 Y case - 9 2023-01-09 Y case - 10 2023-01-06 N under_followup - 11 2023-01-05 N under_followup - 12 2023-01-03 N under_followup - 13 2023-01-05 N under_followup - 14 2023-01-08 N under_followup - 15 2023-01-05 Y case - 16 2023-01-04 N under_followup - 17 2023-01-09 N under_followup - 18 2023-01-07 Y case - 19 2023-01-06 N lost_to_followup - 20 2023-01-08 N under_followup - 21 2023-01-08 Y case - 22 2023-01-08 Y case - 23 2023-01-08 N under_followup - 24 2023-01-08 Y case - 25 2023-01-09 Y case - 26 2023-01-11 Y case - 27 2023-01-13 N under_followup - 28 2023-01-09 N under_followup - 29 2023-01-11 Y case - 30 2023-01-11 Y case - 31 2023-01-12 N under_followup - 32 2023-01-10 N lost_to_followup - 33 2023-01-15 N lost_to_followup - 34 2023-01-18 N lost_to_followup - 35 2023-01-14 Y case + from to age sex + 1 Justin White Alan Vallejos 51 m + 2 Justin White Courtney Fox 44 f + 3 Courtney Fox Laosa Sayavong 49 m + 4 Courtney Fox Jacqueline Aguilera-Aguilera 60 f + 5 Courtney Fox Wafaaa el-Hoque 56 f + 6 Laosa Sayavong Melanie Gomez 49 f + 7 Laosa Sayavong Victor To 50 m + 8 Laosa Sayavong Zana Newton 7 m + 9 Laosa Sayavong Selena Lisle 20 f + 10 Laosa Sayavong Damon Wolfchief 24 m + 11 Laosa Sayavong Javonte Harrison 51 m + 12 Victor To Nathaniel Gradoz 53 m + 13 Victor To Geovanni Montoya 16 m + 14 Damon Wolfchief Rayyana al-Mousa 83 f + 15 Damon Wolfchief Quashaya Mbasi-Botuli 2 f + 16 Damon Wolfchief Jensen Ortiz 48 f + 17 Nathaniel Gradoz Kiana Czajka 65 f + 18 Rayyana al-Mousa Natalie Montez 44 f + 19 Rayyana al-Mousa Orran Curtis IV 77 m + 20 Rayyana al-Mousa Geoffrey Smith 90 m + 21 Rayyana al-Mousa Hamad al-Masood 66 m + 22 Quashaya Mbasi-Botuli Linda Williams 19 f + 23 Jensen Ortiz Jesse Weiss 17 m + 24 Jensen Ortiz Dustin Carpenter 34 m + 25 Hamad al-Masood Asia Owens 75 f + date_first_contact date_last_contact was_case status + 1 2022-12-30 2023-01-03 N lost_to_followup + 2 2023-01-01 2023-01-02 Y case + 3 2023-01-02 2023-01-05 Y case + 4 2023-01-04 2023-01-07 N unknown + 5 2022-12-29 2023-01-06 N under_followup + 6 2023-01-03 2023-01-06 N lost_to_followup + 7 2023-01-02 2023-01-05 Y case + 8 2023-01-03 2023-01-04 Y case + 9 2023-01-02 2023-01-06 N unknown + 10 2023-01-02 2023-01-05 Y case + 11 2023-01-03 2023-01-06 N unknown + 12 2023-01-02 2023-01-04 Y case + 13 2023-01-02 2023-01-04 N under_followup + 14 2023-01-07 2023-01-10 Y case + 15 2023-01-02 2023-01-05 Y case + 16 2023-01-03 2023-01-04 Y case + 17 2023-01-04 2023-01-04 N under_followup + 18 2023-01-03 2023-01-06 N unknown + 19 2023-01-03 2023-01-09 N under_followup + 20 2023-01-03 2023-01-06 N unknown + 21 2023-01-07 2023-01-10 Y case + 22 2023-01-04 2023-01-07 N under_followup + 23 2022-12-29 2023-01-05 N under_followup + 24 2023-01-03 2023-01-06 Y case + 25 2022-12-31 2023-01-04 N under_followup # sim_outbreak works as expected with age-strat risks Code - sim_outbreak(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_outbreak(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, hosp_risk = age_dep_hosp_risk, hosp_death_risk = age_dep_hosp_death_risk, non_hosp_death_risk = age_dep_non_hosp_death_risk) Output $linelist - id case_name case_type sex age date_onset date_admission date_death - 1 1 Rachael Sneesby confirmed f 28 2023-01-01 - 2 2 Nadia Hill confirmed f 62 2023-01-02 2023-01-02 2023-01-07 - 3 5 Jonathan Huynh probable m 42 2023-01-02 - 4 6 Tharwa al-Amber probable f 60 2023-01-03 - 5 8 Ian Sanchez suspected m 28 2023-01-03 - 6 9 Sadie Ross confirmed f 78 2023-01-03 - 7 10 Jordan Marquardt suspected f 31 2023-01-07 - 8 16 Joseph Sky suspected m 33 2023-01-04 - 9 19 Geoffrey Boon confirmed m 86 2023-01-04 - 10 22 Juyoung Sands suspected f 37 2023-01-05 - 11 23 Mya Hunt suspected f 15 2023-01-05 - 12 25 Josef Fortes probable m 81 2023-01-07 2023-01-08 2023-01-29 - 13 26 Badri el-Hoque confirmed m 82 2023-01-08 - 14 27 William Jones probable m 72 2023-01-09 - 15 30 Luis Arreola confirmed m 71 2023-01-12 - 16 31 Zachary Abeyta probable m 50 2023-01-10 - 17 36 Shawnesse Smith suspected f 3 2023-01-10 + id case_name case_type sex age date_onset date_admission date_death + 1 1 Sean Depoyster suspected m 71 2023-01-01 + 2 3 Selena Hernandez suspected f 44 2023-01-02 2023-01-03 2023-01-15 + 3 4 Khairi al-Gaber confirmed m 49 2023-01-02 2023-01-14 + 4 8 Braxton Lindsey probable m 50 2023-01-02 + 5 9 Albert Nguyen suspected m 7 2023-01-02 + 6 11 Keili Ketchum suspected m 24 2023-01-02 + 7 13 Daniel Hemsouvanh confirmed m 53 2023-01-03 + 8 15 Natalie Montez confirmed f 83 2023-01-03 2023-01-05 2023-01-13 + 9 16 Morgan Williams suspected f 2 2023-01-03 2023-01-05 2023-01-10 + 10 17 Briana Greene-King confirmed f 48 2023-01-03 + 11 22 Dominick Maker suspected m 66 2023-01-03 + 12 25 Carl Levi Lee confirmed m 34 2023-01-04 date_first_contact date_last_contact ct_value - 1 24.3 - 2 2023-01-02 2023-01-05 24.3 - 3 2023-01-03 2023-01-04 NA - 4 2023-01-02 2023-01-04 NA - 5 2023-01-02 2023-01-04 NA - 6 2022-12-30 2023-01-05 24.3 - 7 2023-01-06 2023-01-09 NA - 8 2023-01-04 2023-01-05 NA - 9 2023-01-06 2023-01-07 24.3 - 10 2023-01-06 2023-01-08 NA - 11 2023-01-07 2023-01-08 NA - 12 2023-01-07 2023-01-08 NA - 13 2023-01-07 2023-01-09 24.3 - 14 2023-01-10 2023-01-11 NA - 15 2023-01-11 2023-01-11 24.3 - 16 2023-01-08 2023-01-11 NA - 17 2023-01-12 2023-01-14 NA + 1 NA + 2 2023-01-01 2023-01-02 NA + 3 2023-01-02 2023-01-05 25.1 + 4 2023-01-02 2023-01-05 NA + 5 2023-01-03 2023-01-04 NA + 6 2023-01-02 2023-01-05 NA + 7 2023-01-02 2023-01-04 25.1 + 8 2023-01-07 2023-01-10 25.1 + 9 2023-01-02 2023-01-05 NA + 10 2023-01-03 2023-01-04 25.1 + 11 2023-01-07 2023-01-10 NA + 12 2023-01-03 2023-01-06 25.1 $contacts - from to age sex date_first_contact - 1 Rachael Sneesby Nadia Hill 62 f 2023-01-02 - 2 Rachael Sneesby Diane Slaugh 20 f 2023-01-04 - 3 Nadia Hill Kelvin Poveromo 29 m 2023-01-05 - 4 Nadia Hill Jonathan Huynh 42 m 2023-01-03 - 5 Nadia Hill Tharwa al-Amber 60 f 2023-01-02 - 6 Nadia Hill Taaliba el-Habibi 65 f 2022-12-31 - 7 Jonathan Huynh Ian Sanchez 28 m 2023-01-02 - 8 Jonathan Huynh Sadie Ross 78 f 2022-12-30 - 9 Tharwa al-Amber Jordan Marquardt 31 f 2023-01-06 - 10 Tharwa al-Amber Jacob Martinez 12 m 2023-01-04 - 11 Tharwa al-Amber Melissa Salazar 80 f 2023-01-03 - 12 Ian Sanchez Larissa Garcia Perez 44 f 2022-12-30 - 13 Ian Sanchez Dakota Kremke 74 m 2023-01-01 - 14 Ian Sanchez Atif Jung 26 m 2023-01-07 - 15 Ian Sanchez Joseph Sky 33 m 2023-01-04 - 16 Ian Sanchez Sean Powell 4 m 2022-12-31 - 17 Jordan Marquardt Jonah Smith 53 m 2023-01-06 - 18 Joseph Sky Geoffrey Boon 86 m 2023-01-06 - 19 Geoffrey Boon Husniyya al-Zamani 89 f 2023-01-05 - 20 Geoffrey Boon Leona Torres 24 f 2023-01-07 - 21 Geoffrey Boon Juyoung Sands 37 f 2023-01-06 - 22 Juyoung Sands Mya Hunt 15 f 2023-01-07 - 23 Mya Hunt Chandler Saldana-Martine 14 m 2023-01-06 - 24 Mya Hunt Josef Fortes 81 m 2023-01-07 - 25 Josef Fortes Badri el-Hoque 82 m 2023-01-07 - 26 Badri el-Hoque William Jones 72 m 2023-01-10 - 27 Badri el-Hoque Ka Lok Le 53 m 2023-01-10 - 28 Badri el-Hoque Bryan Goodwine 56 m 2023-01-05 - 29 William Jones Luis Arreola 71 m 2023-01-11 - 30 William Jones Zachary Abeyta 50 m 2023-01-08 - 31 William Jones Naasif al-Sani 73 m 2023-01-07 - 32 William Jones Danielle Morser 20 f 2023-01-08 - 33 Luis Arreola Maahir al-Jamal 75 m 2023-01-15 - 34 Luis Arreola Arielle Connor 2 f 2023-01-17 - 35 Zachary Abeyta Shawnesse Smith 3 f 2023-01-12 + from to age sex date_first_contact + 1 Sean Depoyster Carlos Bingham 51 m 2022-12-30 + 2 Sean Depoyster Selena Hernandez 44 f 2023-01-01 + 3 Selena Hernandez Khairi al-Gaber 49 m 2023-01-02 + 4 Selena Hernandez Naseema al-Mousa 60 f 2023-01-04 + 5 Selena Hernandez Kristin Owens 56 f 2022-12-29 + 6 Khairi al-Gaber Jensen Ortiz 49 f 2023-01-03 + 7 Khairi al-Gaber Braxton Lindsey 50 m 2023-01-02 + 8 Khairi al-Gaber Albert Nguyen 7 m 2023-01-03 + 9 Khairi al-Gaber Ceara Rivera Munoz 20 f 2023-01-02 + 10 Khairi al-Gaber Keili Ketchum 24 m 2023-01-02 + 11 Khairi al-Gaber Johnathan Catlin 51 m 2023-01-03 + 12 Braxton Lindsey Daniel Hemsouvanh 53 m 2023-01-02 + 13 Braxton Lindsey Aaron Todman 16 m 2023-01-02 + 14 Keili Ketchum Natalie Montez 83 f 2023-01-07 + 15 Keili Ketchum Morgan Williams 2 f 2023-01-02 + 16 Keili Ketchum Briana Greene-King 48 f 2023-01-03 + 17 Daniel Hemsouvanh Iliana Vasquez 65 f 2023-01-04 + 18 Natalie Montez Heaven Ford 44 f 2023-01-03 + 19 Natalie Montez Trey-Logan Russell 77 m 2023-01-03 + 20 Natalie Montez Jonel Jin 90 m 2023-01-03 + 21 Natalie Montez Dominick Maker 66 m 2023-01-07 + 22 Morgan Williams Kylee Koskovich 19 f 2023-01-04 + 23 Briana Greene-King Francisco Huerta Lopez 17 m 2022-12-29 + 24 Briana Greene-King Carl Levi Lee 34 m 2023-01-03 + 25 Dominick Maker Alexa Jackson 75 f 2022-12-31 date_last_contact was_case status - 1 2023-01-05 Y case - 2 2023-01-07 N lost_to_followup - 3 2023-01-08 N lost_to_followup - 4 2023-01-04 Y case - 5 2023-01-04 Y case - 6 2023-01-03 N unknown - 7 2023-01-04 Y case - 8 2023-01-05 Y case - 9 2023-01-09 Y case - 10 2023-01-06 N under_followup - 11 2023-01-05 N lost_to_followup - 12 2023-01-03 N under_followup - 13 2023-01-05 N under_followup - 14 2023-01-08 N unknown + 1 2023-01-03 N lost_to_followup + 2 2023-01-02 Y case + 3 2023-01-05 Y case + 4 2023-01-07 N under_followup + 5 2023-01-06 N under_followup + 6 2023-01-06 N under_followup + 7 2023-01-05 Y case + 8 2023-01-04 Y case + 9 2023-01-06 N under_followup + 10 2023-01-05 Y case + 11 2023-01-06 N under_followup + 12 2023-01-04 Y case + 13 2023-01-04 N lost_to_followup + 14 2023-01-10 Y case 15 2023-01-05 Y case - 16 2023-01-04 N under_followup - 17 2023-01-09 N under_followup - 18 2023-01-07 Y case - 19 2023-01-06 N under_followup - 20 2023-01-08 N under_followup - 21 2023-01-08 Y case - 22 2023-01-08 Y case - 23 2023-01-08 N under_followup - 24 2023-01-08 Y case - 25 2023-01-09 Y case - 26 2023-01-11 Y case - 27 2023-01-13 N lost_to_followup - 28 2023-01-09 N unknown - 29 2023-01-11 Y case - 30 2023-01-11 Y case - 31 2023-01-12 N lost_to_followup - 32 2023-01-10 N under_followup - 33 2023-01-15 N under_followup - 34 2023-01-18 N under_followup - 35 2023-01-14 Y case + 16 2023-01-04 Y case + 17 2023-01-04 N under_followup + 18 2023-01-06 N under_followup + 19 2023-01-09 N under_followup + 20 2023-01-06 N under_followup + 21 2023-01-10 Y case + 22 2023-01-07 N under_followup + 23 2023-01-05 N under_followup + 24 2023-01-06 Y case + 25 2023-01-04 N under_followup # sim_outbreak works as expected with age structure Code - sim_outbreak(contact_distribution = contact_distribution, contact_interval = contact_interval, + sim_outbreak(contact_distribution = contact_distribution, infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, population_age = age_struct) Output $linelist - id case_name case_type sex age date_onset date_admission - 1 1 Molly Archuleta confirmed f 8 2023-01-01 - 2 2 Gracie Lorenz confirmed f 76 2023-01-02 2023-01-03 - 3 5 David Alexis confirmed m 9 2023-01-02 - 4 6 Jazmyn Trotter-Brown confirmed f 89 2023-01-03 2023-01-05 - 5 8 Jack Byers confirmed m 16 2023-01-03 2023-01-04 - 6 9 Janet Cortez confirmed f 82 2023-01-03 - 7 10 Angeling Das probable f 27 2023-01-07 - 8 16 Paul Collier probable m 47 2023-01-04 - 9 19 Shawn Bustos-Campos confirmed m 85 2023-01-04 2023-01-10 - 10 22 Fuaada al-Kanan suspected f 57 2023-01-05 - 11 23 Caitlin Reeves probable f 89 2023-01-05 - 12 25 Samuel Thacker confirmed m 90 2023-01-07 - 13 26 Kenneth Huggins suspected m 48 2023-01-08 - 14 27 Alonzo Foster confirmed m 62 2023-01-09 - 15 30 Wajeeb al-Jafri confirmed m 9 2023-01-12 - 16 31 Kyron Pollard confirmed m 29 2023-01-10 - 17 36 Quinasia Lewis probable f 79 2023-01-10 - date_death date_first_contact date_last_contact ct_value - 1 24.3 - 2 2023-01-02 2023-01-05 24.3 - 3 2023-01-03 2023-01-04 24.3 - 4 2023-01-02 2023-01-04 24.3 - 5 2023-01-02 2023-01-04 24.3 - 6 2022-12-30 2023-01-05 24.3 - 7 2023-01-06 2023-01-09 NA - 8 2023-01-04 2023-01-05 NA - 9 2023-01-06 2023-01-07 24.3 - 10 2023-01-06 2023-01-08 NA - 11 2023-01-07 2023-01-08 NA - 12 2023-01-07 2023-01-08 24.3 - 13 2023-01-07 2023-01-09 NA - 14 2023-01-10 2023-01-11 24.3 - 15 2023-01-11 2023-01-11 24.3 - 16 2023-01-08 2023-01-11 24.3 - 17 2023-01-12 2023-01-14 NA + id case_name case_type sex age date_onset date_admission date_death + 1 1 Cass Jumbo suspected m 13 2023-01-01 + 2 3 Stephanie Park probable f 24 2023-01-02 + 3 4 Joseph Orlowske confirmed m 52 2023-01-02 + 4 8 Hunter Saunders confirmed m 25 2023-01-02 + 5 9 Anthony Carr confirmed m 69 2023-01-02 2023-01-15 + 6 11 Thaamir al-Masood suspected m 19 2023-01-02 + 7 13 Riyaal al-Samra suspected m 68 2023-01-03 2023-01-04 + 8 15 Emily Rodriguez probable f 84 2023-01-03 + 9 16 Allyson Browne confirmed f 79 2023-01-03 + 10 17 Aneesa al-Malak confirmed f 5 2023-01-03 + 11 22 Jonah Sterling probable m 66 2023-01-03 + 12 25 Michael Lopez suspected m 26 2023-01-04 2023-01-07 + date_first_contact date_last_contact ct_value + 1 NA + 2 2023-01-01 2023-01-02 NA + 3 2023-01-02 2023-01-05 25.5 + 4 2023-01-02 2023-01-05 25.5 + 5 2023-01-03 2023-01-04 25.5 + 6 2023-01-02 2023-01-05 NA + 7 2023-01-02 2023-01-04 NA + 8 2023-01-07 2023-01-10 NA + 9 2023-01-02 2023-01-05 25.5 + 10 2023-01-03 2023-01-04 25.5 + 11 2023-01-07 2023-01-10 NA + 12 2023-01-03 2023-01-06 NA $contacts - from to age sex date_first_contact - 1 Molly Archuleta Gracie Lorenz 76 f 2023-01-02 - 2 Molly Archuleta Mas'ooda el-Azad 65 f 2023-01-04 - 3 Gracie Lorenz Jonathan Mccabe 35 m 2023-01-05 - 4 Gracie Lorenz David Alexis 9 m 2023-01-03 - 5 Gracie Lorenz Jazmyn Trotter-Brown 89 f 2023-01-02 - 6 Gracie Lorenz Jenifer Sanchez 36 f 2022-12-31 - 7 David Alexis Jack Byers 16 m 2023-01-02 - 8 David Alexis Janet Cortez 82 f 2022-12-30 - 9 Jazmyn Trotter-Brown Angeling Das 27 f 2023-01-06 - 10 Jazmyn Trotter-Brown Thewodros Martinez 35 m 2023-01-04 - 11 Jazmyn Trotter-Brown Bianca Naranjo 2 f 2023-01-03 - 12 Jack Byers Alexandra Brostrom 6 f 2022-12-30 - 13 Jack Byers Timothy Rademacher 23 m 2023-01-01 - 14 Jack Byers Kail Fanshier 90 m 2023-01-07 - 15 Jack Byers Paul Collier 47 m 2023-01-04 - 16 Jack Byers Timothy Diaz 64 m 2022-12-31 - 17 Angeling Das Mark Soto 16 m 2023-01-06 - 18 Paul Collier Shawn Bustos-Campos 85 m 2023-01-06 - 19 Shawn Bustos-Campos Picabo Colin 42 f 2023-01-05 - 20 Shawn Bustos-Campos Ana Rinard 26 f 2023-01-07 - 21 Shawn Bustos-Campos Fuaada al-Kanan 57 f 2023-01-06 - 22 Fuaada al-Kanan Caitlin Reeves 89 f 2023-01-07 - 23 Caitlin Reeves Brendan Watts 21 m 2023-01-06 - 24 Caitlin Reeves Samuel Thacker 90 m 2023-01-07 - 25 Samuel Thacker Kenneth Huggins 48 m 2023-01-07 - 26 Kenneth Huggins Alonzo Foster 62 m 2023-01-10 - 27 Kenneth Huggins Hector Correa 20 m 2023-01-10 - 28 Kenneth Huggins Samuel Classick 4 m 2023-01-05 - 29 Alonzo Foster Wajeeb al-Jafri 9 m 2023-01-11 - 30 Alonzo Foster Kyron Pollard 29 m 2023-01-08 - 31 Alonzo Foster Lexie Meeks 32 m 2023-01-07 - 32 Alonzo Foster Ahanabah Smith 82 f 2023-01-08 - 33 Wajeeb al-Jafri Jordan Altman 75 m 2023-01-15 - 34 Wajeeb al-Jafri Kebremeskel Gaines 2 f 2023-01-17 - 35 Kyron Pollard Quinasia Lewis 79 f 2023-01-12 + from to age sex date_first_contact + 1 Cass Jumbo Donald Lohrenz 62 m 2022-12-30 + 2 Cass Jumbo Stephanie Park 24 f 2023-01-01 + 3 Stephanie Park Joseph Orlowske 52 m 2023-01-02 + 4 Stephanie Park Brialle Carrillo-Loera 74 f 2023-01-04 + 5 Stephanie Park Hailey Miller 76 f 2022-12-29 + 6 Joseph Orlowske Hamna el-Chahine 26 f 2023-01-03 + 7 Joseph Orlowske Hunter Saunders 25 m 2023-01-02 + 8 Joseph Orlowske Anthony Carr 69 m 2023-01-03 + 9 Joseph Orlowske Alexis Garcia 53 f 2023-01-02 + 10 Joseph Orlowske Thaamir al-Masood 19 m 2023-01-02 + 11 Joseph Orlowske Jaarallah el-Elbaz 49 m 2023-01-03 + 12 Hunter Saunders Riyaal al-Samra 68 m 2023-01-02 + 13 Hunter Saunders Jose Galvan 82 m 2023-01-02 + 14 Thaamir al-Masood Emily Rodriguez 84 f 2023-01-07 + 15 Thaamir al-Masood Allyson Browne 79 f 2023-01-02 + 16 Thaamir al-Masood Aneesa al-Malak 5 f 2023-01-03 + 17 Riyaal al-Samra Faseeha el-Riaz 78 f 2023-01-04 + 18 Emily Rodriguez Alexandria Marez 85 f 2023-01-03 + 19 Emily Rodriguez Dante Hill 36 m 2023-01-03 + 20 Emily Rodriguez Benjamin Stuart Rasi 62 m 2023-01-03 + 21 Emily Rodriguez Jonah Sterling 66 m 2023-01-07 + 22 Allyson Browne Tia Williams 43 f 2023-01-04 + 23 Aneesa al-Malak Charles Agee 61 m 2022-12-29 + 24 Aneesa al-Malak Michael Lopez 26 m 2023-01-03 + 25 Jonah Sterling Najlaa el-Dada 81 f 2022-12-31 date_last_contact was_case status - 1 2023-01-05 Y case - 2 2023-01-07 N under_followup - 3 2023-01-08 N under_followup - 4 2023-01-04 Y case - 5 2023-01-04 Y case - 6 2023-01-03 N under_followup - 7 2023-01-04 Y case - 8 2023-01-05 Y case - 9 2023-01-09 Y case - 10 2023-01-06 N under_followup - 11 2023-01-05 N under_followup - 12 2023-01-03 N under_followup - 13 2023-01-05 N under_followup - 14 2023-01-08 N under_followup + 1 2023-01-03 N under_followup + 2 2023-01-02 Y case + 3 2023-01-05 Y case + 4 2023-01-07 N under_followup + 5 2023-01-06 N unknown + 6 2023-01-06 N under_followup + 7 2023-01-05 Y case + 8 2023-01-04 Y case + 9 2023-01-06 N under_followup + 10 2023-01-05 Y case + 11 2023-01-06 N under_followup + 12 2023-01-04 Y case + 13 2023-01-04 N under_followup + 14 2023-01-10 Y case 15 2023-01-05 Y case - 16 2023-01-04 N lost_to_followup - 17 2023-01-09 N under_followup - 18 2023-01-07 Y case - 19 2023-01-06 N under_followup - 20 2023-01-08 N unknown - 21 2023-01-08 Y case - 22 2023-01-08 Y case - 23 2023-01-08 N lost_to_followup - 24 2023-01-08 Y case - 25 2023-01-09 Y case - 26 2023-01-11 Y case - 27 2023-01-13 N under_followup - 28 2023-01-09 N under_followup - 29 2023-01-11 Y case - 30 2023-01-11 Y case - 31 2023-01-12 N under_followup - 32 2023-01-10 N under_followup - 33 2023-01-15 N under_followup - 34 2023-01-18 N lost_to_followup - 35 2023-01-14 Y case + 16 2023-01-04 Y case + 17 2023-01-04 N lost_to_followup + 18 2023-01-06 N under_followup + 19 2023-01-09 N under_followup + 20 2023-01-06 N under_followup + 21 2023-01-10 Y case + 22 2023-01-07 N lost_to_followup + 23 2023-01-05 N lost_to_followup + 24 2023-01-06 Y case + 25 2023-01-04 N under_followup diff --git a/tests/testthat/test-checkers.R b/tests/testthat/test-checkers.R index bb48a4f8..58333333 100644 --- a/tests/testthat/test-checkers.R +++ b/tests/testthat/test-checkers.R @@ -145,9 +145,9 @@ suppressMessages({ prob_distribution_params = c(mean = 2) )) - contact_interval <- as.function(epiparameter::epidist( + infect_period <- as.function(epiparameter::epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) )) @@ -171,7 +171,7 @@ test_that(".check_sim_input works as expected", { chk <- .check_sim_input( sim_type = "outbreak", contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, outbreak_start_date = as.Date("2023-01-01"), outbreak_size = c(10, 1e4), @@ -200,7 +200,7 @@ test_that(".check_sim_input works as expected", { chk <- .check_sim_input( sim_type = "linelist", contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, outbreak_start_date = as.Date("2023-01-01"), outbreak_size = c(10, 1e4), @@ -224,7 +224,7 @@ test_that(".check_sim_input works as expected", { chk <- .check_sim_input( sim_type = "contacts", contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, outbreak_start_date = as.Date("2023-01-01"), outbreak_size = c(10, 1e4), @@ -245,18 +245,27 @@ test_that(".check_sim_input fails as expected", { regexp = "(arg)*(should be one of)*(linelist)*(contacts)*(outbreak)" ) expect_error( - .check_sim_input(sim_type = "outbreak", contact_distribution = list(), prob_infect = 0.5), + .check_sim_input( + sim_type = "outbreak", + contact_distribution = list(), + prob_infect = 0.5 + ), regexp = "(Assertion on)*(contact_distribution)*(failed)" ) expect_error( - .check_sim_input(sim_type = "outbreak", contact_distribution = contact_distribution, contact_interval = list(), prob_infect = 0.5), - regexp = "(Assertion on)*(contact_interval)*(failed)" + .check_sim_input( + sim_type = "outbreak", + contact_distribution = contact_distribution, + infect_period = list(), + prob_infect = 0.5 + ), + regexp = "(Assertion on)*(infect_period)*(failed)" ) expect_error( .check_sim_input( sim_type = "outbreak", contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, outbreak_start_date = "01-01-2023" ), @@ -266,7 +275,7 @@ test_that(".check_sim_input fails as expected", { .check_sim_input( sim_type = "outbreak", contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, outbreak_start_date = as.Date("2023-01-01"), outbreak_size = "c(10, 1e4)" diff --git a/tests/testthat/test-sim_contacts.R b/tests/testthat/test-sim_contacts.R index d894284c..80cb1066 100644 --- a/tests/testthat/test-sim_contacts.R +++ b/tests/testthat/test-sim_contacts.R @@ -6,9 +6,9 @@ suppressMessages({ prob_distribution_params = c(mean = 2) ) - contact_interval <- epiparameter::epidist( + infect_period <- epiparameter::epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) ) @@ -19,7 +19,7 @@ test_that("sim_contacts works as expected", { expect_snapshot( sim_contacts( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5 ) ) @@ -30,7 +30,7 @@ test_that("sim_contacts works as expected with modified config", { expect_snapshot( sim_contacts( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, config = create_config( last_contact_distribution = "geom", @@ -45,7 +45,7 @@ test_that("sim_contacts works as expected with modified config parameters", { expect_snapshot( sim_contacts( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, config = create_config( last_contact_distribution_params = c(lambda = 5) @@ -58,7 +58,7 @@ test_that("sim_contacts fails as expected with modified config", { expect_error( sim_contacts( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, config = create_config( last_contact_distribution = "geom" @@ -72,7 +72,7 @@ test_that("sim_contacts fails as expected with empty config", { expect_error( sim_contacts( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, config = list() ), @@ -90,7 +90,7 @@ test_that("sim_contacts works as expected with age structure", { expect_snapshot( sim_contacts( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, population_age = age_struct ) diff --git a/tests/testthat/test-sim_linelist.R b/tests/testthat/test-sim_linelist.R index 184694af..11a91dce 100644 --- a/tests/testthat/test-sim_linelist.R +++ b/tests/testthat/test-sim_linelist.R @@ -6,9 +6,9 @@ suppressMessages({ prob_distribution_params = c(mean = 2) ) - contact_interval <- epiparameter::epidist( + infect_period <- epiparameter::epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) ) @@ -33,7 +33,7 @@ test_that("sim_linelist works as expected", { expect_snapshot( sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death @@ -58,7 +58,7 @@ test_that("sim_linelist works as expected with age-strat risks", { expect_snapshot( sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -74,7 +74,7 @@ test_that("sim_linelist works as expected without Ct", { expect_snapshot( sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -88,7 +88,7 @@ test_that("sim_linelist works as expected with anonymous", { expect_snapshot( sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -107,7 +107,7 @@ test_that("sim_linelist works as expected with age structure", { expect_snapshot( sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -130,7 +130,7 @@ test_that("sim_linelist works as expected with age-strat risks & age struct", { expect_snapshot( sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -149,7 +149,7 @@ test_that("sim_linelist gives expected proportion of ages with age struct", { set.seed(3) linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -180,7 +180,7 @@ test_that("sim_linelist works as expected with modified config", { expect_snapshot( sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -197,7 +197,7 @@ test_that("sim_linelist works as expected with modified config parameters", { expect_snapshot( sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -213,7 +213,7 @@ test_that("sim_linelist warns as expected", { expect_warning( sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -227,7 +227,7 @@ test_that("sim_linelist fails as expected with modified config", { expect_error( sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -241,7 +241,7 @@ test_that("sim_linelist fails as expected with modified config", { expect_error( sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -258,7 +258,7 @@ test_that("sim_linelist fails as expected with empty config", { expect_error( sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -273,7 +273,7 @@ test_that("sim_linelist fails as expected exceeding max iter for bp model", { expect_error( sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.1, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death diff --git a/tests/testthat/test-sim_network_bp.R b/tests/testthat/test-sim_network_bp.R index 6efa66e3..380dc046 100644 --- a/tests/testthat/test-sim_network_bp.R +++ b/tests/testthat/test-sim_network_bp.R @@ -8,10 +8,10 @@ suppressMessages({ ) ) - contact_interval <- as.function( + infect_period <- as.function( epiparameter::epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) ), func_type = "generate" @@ -23,7 +23,7 @@ test_that(".sim_network_bp works as expected", { expect_snapshot( .sim_network_bp( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, max_outbreak_size = 1e4, config = create_config() @@ -46,7 +46,7 @@ test_that(".sim_network_bp works as expected with no contacts", { expect_snapshot( .sim_network_bp( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, max_outbreak_size = 1e4, config = create_config() @@ -59,7 +59,7 @@ test_that(".sim_network_bp works as expected with unadjusted network", { expect_snapshot( .sim_network_bp( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, max_outbreak_size = 1e4, config = create_config(network = "unadjusted") @@ -72,7 +72,7 @@ test_that(".sim_network_bp warns as expected", { expect_warning( .sim_network_bp( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, max_outbreak_size = 10, config = create_config() diff --git a/tests/testthat/test-sim_outbreak.R b/tests/testthat/test-sim_outbreak.R index 3ddcbb62..eaac2848 100644 --- a/tests/testthat/test-sim_outbreak.R +++ b/tests/testthat/test-sim_outbreak.R @@ -6,9 +6,9 @@ suppressMessages({ prob_distribution_params = c(mean = 2) ) - contact_interval <- epiparameter::epidist( + infect_period <- epiparameter::epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) ) @@ -33,7 +33,7 @@ test_that("sim_outbreak works as expected", { expect_snapshot( sim_outbreak( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death @@ -46,7 +46,7 @@ test_that("sim_outbreak works as expected with add_names = FALSE", { expect_snapshot( sim_outbreak( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -72,7 +72,7 @@ test_that("sim_outbreak works as expected with age-strat risks", { expect_snapshot( sim_outbreak( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -93,7 +93,7 @@ test_that("sim_outbreak works as expected with age structure", { expect_snapshot( sim_outbreak( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, From a65a50654a2f6127d24165d2e54a7210812f71ea Mon Sep 17 00:00:00 2001 From: Joshua Lambert Date: Fri, 22 Mar 2024 12:07:07 +0000 Subject: [PATCH 4/7] updated vignettes to use infectious period, relates #61 --- vignettes/age-strat-risks.Rmd | 20 ++++++++++---------- vignettes/age-struct-pop.Rmd | 12 ++++++------ vignettes/simulist.Rmd | 26 +++++++++++++------------- vignettes/vis-linelist.Rmd | 8 ++++---- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/vignettes/age-strat-risks.Rmd b/vignettes/age-strat-risks.Rmd index cc3939e7..cfcd8f44 100644 --- a/vignettes/age-strat-risks.Rmd +++ b/vignettes/age-strat-risks.Rmd @@ -51,9 +51,9 @@ contact_distribution <- epidist( prob_distribution_params = c(mean = 2) ) -contact_interval <- epidist( +infect_period <- epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) ) @@ -90,7 +90,7 @@ Simulate a line list with population-wide default risks: ```{r, sim-linelist} linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death @@ -105,7 +105,7 @@ We can run another simulation and change the hospitalisation and death risks, in ```{r, sim-linelist-diff-risks} linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -140,7 +140,7 @@ age_dep_hosp_risk ```{r, sim-age-strat-linelist} linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -169,7 +169,7 @@ age_dep_hosp_risk linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -187,7 +187,7 @@ age_dep_hosp_risk <- data.frame( linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -211,7 +211,7 @@ age_dep_hosp_death_risk linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -228,7 +228,7 @@ age_dep_non_hosp_death_risk linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -254,7 +254,7 @@ age_dep_non_hosp_death_risk <- data.frame( linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, diff --git a/vignettes/age-struct-pop.Rmd b/vignettes/age-struct-pop.Rmd index d3c72a38..0990f0ed 100644 --- a/vignettes/age-struct-pop.Rmd +++ b/vignettes/age-struct-pop.Rmd @@ -34,7 +34,7 @@ library(epiparameter) library(ggplot2) ``` -First we load the requested delay distributions using the {epiparameter} package. The onset-to-hospitalisation and onset-to-death delay distributions are extracted from the {epiparameter} database, and the contact distribution and the contact interval are manually defined as they are not yet available from the {epiparameter} database. +First we load the requested delay distributions using the {epiparameter} package. The onset-to-hospitalisation and onset-to-death delay distributions are extracted from the {epiparameter} database, and the contact distribution and the infectious period are manually defined as they are not yet available from the {epiparameter} database. ```{r, read-delay-dists} contact_distribution <- epidist( @@ -44,9 +44,9 @@ contact_distribution <- epidist( prob_distribution_params = c(mean = 2) ) -contact_interval <- epidist( +infect_period <- epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) ) @@ -83,7 +83,7 @@ All simulations in this vignette condition the simulation to have a minimum outb ```{r sim-linelist-age-range} linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.45, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -128,7 +128,7 @@ age_struct ```{r, sim-age-struct-linelist} linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.45, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -181,7 +181,7 @@ age_struct ```{r, sim-age-struct-linelist-young} linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.45, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, diff --git a/vignettes/simulist.Rmd b/vignettes/simulist.Rmd index 0b68a00e..8df5656e 100644 --- a/vignettes/simulist.Rmd +++ b/vignettes/simulist.Rmd @@ -20,7 +20,7 @@ knitr::opts_chunk$set( This is an introductory vignette to the {simulist} R package. {simulist} simulates two types of common epidemiological data collected during infectious disease outbreaks: 1) a line list, which provides individual-level descriptions of cases in an outbreak; 2) a contact dataset, which provides details of which others individuals were in contact with each of the cases. -The main function in the {simulist} package is `sim_linelist()`. This functions takes in arguments that control the dynamics of the outbreak, such as the contact interval (i.e. time delay between contacts), and outputs a line list table (``) with case information for each infected individual. +The main function in the {simulist} package is `sim_linelist()`. This functions takes in arguments that control the dynamics of the outbreak, such as the infectious period, and outputs a line list table (``) with case information for each infected individual. For this introduction we will simulate a line list for the early stages of a COVID-19 (SARS-CoV-2) outbreak. This will require two R packages: {simulist}, to produce the line list, and {epiparameter} to provide epidemiological parameters, such as onset-to-death delays. @@ -40,10 +40,10 @@ contact_distribution <- epidist( prob_distribution_params = c(mean = 2) ) -# create contact interval (not available from {epiparameter} database) -contact_interval <- epidist( +# create infectious period (not available from {epiparameter} database) +infect_period <- epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) ) @@ -69,12 +69,12 @@ The seed is set to ensure the output of the vignette is consistent. When using { set.seed(123) ``` -The first argument in `sim_linelist()` is the contact distribution (`contact_distribution`), which here we specify as Poisson distribution with a mean (average) number of contacts of 2, and with the contact interval and probability of infection per contact (`prob_infect`) will control the growth rate of the simulated epidemic. Here we set the probability of infection as 0.5 (on average half of contacts become infected). The minimum requirements to simulate a line list are the contact distribution, the contact interval, probability of infection, onset-to-hospitalisation delay and onset-to-death delay. +The first argument in `sim_linelist()` is the contact distribution (`contact_distribution`), which here we specify as Poisson distribution with a mean (average) number of contacts of 2, and with the infectious period and probability of infection per contact (`prob_infect`) will control the growth rate of the simulated epidemic. Here we set the probability of infection as 0.5 (on average half of contacts become infected). The minimum requirements to simulate a line list are the contact distribution, the infectious period, probability of infection, onset-to-hospitalisation delay and onset-to-death delay. ```{r, sim-linelist} linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death @@ -106,7 +106,7 @@ When requiring a line list that represents a large outbreak, such as the COVID-1 ```{r, sim-large-linelist} linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -128,7 +128,7 @@ The line list output from the {simulist} simulation contains a column (`case_typ ```{r, sim-linelist-default-case-type} linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death @@ -141,7 +141,7 @@ To alter these probabilities, supply a named vector to the `sim_linelist()` argu ```{r, sim-linelist-mod-case-type} linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -161,7 +161,7 @@ By default `sim_linelist()` provides the name of each individual in the line lis ```{r sim-anon-linelist} linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -187,7 +187,7 @@ To simulate a contacts table, the `sim_contacts()` function can be used. This re ```{r, sim-contacts} contacts <- sim_contacts( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5) head(contacts) ``` @@ -201,7 +201,7 @@ In order to simulate a line list and a contacts table of the same outbreak the ` ```{r, sim-outbreak} outbreak <- sim_outbreak( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death @@ -227,7 +227,7 @@ It is possible to use an [anonymous function](https://en.wikipedia.org/wiki/Anon ```{r, sim-outbreak-anon-func} outbreak <- sim_outbreak( contact_distribution = function(x) dpois(x = x, lambda = 2), - contact_interval = function(x) rgamma(n = x, shape = 2, scale = 2), + infect_period = function(x) rgamma(n = x, shape = 2, scale = 2), prob_infect = 0.5, onset_to_hosp = function(x) rlnorm(n = x, meanlog = 1.5, sdlog = 0.5), onset_to_death = function(x) rweibull(n = x, shape = 0.5, scale = 0.2) diff --git a/vignettes/vis-linelist.Rmd b/vignettes/vis-linelist.Rmd index cb714f22..0ac8bb89 100644 --- a/vignettes/vis-linelist.Rmd +++ b/vignettes/vis-linelist.Rmd @@ -35,9 +35,9 @@ contact_distribution <- epidist( prob_distribution_params = c(mean = 3) ) -contact_interval <- epidist( +infect_period <- epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 3, scale = 2) ) @@ -68,7 +68,7 @@ Using a simple line list simulation with the factory default settings: ```{r sim-linelist} linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.33, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -184,7 +184,7 @@ contact_distribution <- epidist( set.seed(1) outbreak <- sim_outbreak( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death From 9d3cffae1ba27b9ca539a68f1498811de57cb10d Mon Sep 17 00:00:00 2001 From: Joshua Lambert Date: Fri, 22 Mar 2024 12:07:25 +0000 Subject: [PATCH 5/7] updated README with infectious period, relates #61 --- README.Rmd | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.Rmd b/README.Rmd index a1a329b7..3e7ef7b7 100644 --- a/README.Rmd +++ b/README.Rmd @@ -50,7 +50,7 @@ library(simulist) library(epiparameter) ``` -The line list simulation requires that we define a contact distribution, contact interval, onset-to-hospitalisation delay, and onset-to-death delay. We can load these from the library of epidemiological parameters in the `{epiparameter}` R package if available, or if these are not in the database yet (such as the contact interval for COVID-19) we can define them ourselves. +The line list simulation requires that we define a contact distribution, period of infectiousness, onset-to-hospitalisation delay, and onset-to-death delay. We can load these from the library of epidemiological parameters in the `{epiparameter}` R package if available, or if these are not in the database yet (such as the contact distribution for COVID-19) we can define them ourselves. ```{r create-epidists} # create COVID-19 contact distribution @@ -61,10 +61,10 @@ contact_distribution <- epiparameter::epidist( prob_distribution_params = c(mean = 2) ) -# create COVID-19 contact interval -contact_interval <- epiparameter::epidist( +# create COVID-19 infectious period +infect_period <- epiparameter::epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) ) @@ -92,7 +92,7 @@ To simulate a line list for COVID-19 with an Poisson contact distribution with a set.seed(1) linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death @@ -105,7 +105,7 @@ In this example, the line list is simulated using the default values (see `?sim_ ```{r sim-linelist-diff-args} linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -120,7 +120,7 @@ To simulate a table of contacts of cases (i.e. to reflect a contact tracing data ```{r, sim-contacts} contacts <- sim_contacts( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5 ) head(contacts) @@ -131,7 +131,7 @@ If both the line list and contacts table are required, they can be jointly simul ```{r, sim-outbreak} outbreak <- sim_outbreak( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death From 44f97a6384075d7ff4264cfb39463720fb4fbc6c Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 22 Mar 2024 12:09:00 +0000 Subject: [PATCH 6/7] Automatic readme update --- README.md | 144 +++++++++++++++++++++++++++--------------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index 329673c8..a3dcb852 100644 --- a/README.md +++ b/README.md @@ -51,11 +51,11 @@ library(epiparameter) ``` The line list simulation requires that we define a contact distribution, -contact interval, onset-to-hospitalisation delay, and onset-to-death -delay. We can load these from the library of epidemiological parameters -in the `{epiparameter}` R package if available, or if these are not in -the database yet (such as the contact interval for COVID-19) we can -define them ourselves. +period of infectiousness, onset-to-hospitalisation delay, and +onset-to-death delay. We can load these from the library of +epidemiological parameters in the `{epiparameter}` R package if +available, or if these are not in the database yet (such as the contact +distribution for COVID-19) we can define them ourselves. ``` r # create COVID-19 contact distribution @@ -67,10 +67,10 @@ contact_distribution <- epiparameter::epidist( ) #> Citation cannot be created as author, year, journal or title is missing -# create COVID-19 contact interval -contact_interval <- epiparameter::epidist( +# create COVID-19 infectious period +infect_period <- epiparameter::epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) ) @@ -129,26 +129,26 @@ list early without producing an excessively large data set. set.seed(1) linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death ) head(linelist) -#> id case_name case_type sex age date_onset date_admission date_death -#> 1 1 Macella Moreland confirmed f 28 2023-01-01 -#> 2 2 Kayla Ellerman confirmed f 62 2023-01-02 2023-01-02 -#> 3 5 Matthew Biggerstaff confirmed m 42 2023-01-01 -#> 4 6 Vanessa Sihombing probable f 60 2023-01-01 -#> 5 8 Ross Mcclintock suspected m 28 2023-01-02 2023-01-03 -#> 6 9 Danielle Medero confirmed f 78 2023-01-01 +#> id case_name case_type sex age date_onset date_admission date_death +#> 1 1 Joshua Esparza confirmed m 71 2023-01-01 +#> 2 3 Alyshah Atkins confirmed f 44 2023-01-02 2023-01-24 +#> 3 4 Rifat al-Mussa suspected m 49 2023-01-02 2023-01-03 +#> 4 8 Zachery Miramontes probable m 50 2023-01-02 +#> 5 9 Ryan Zahn probable m 7 2023-01-02 +#> 6 11 Bruce Hishinuma confirmed m 24 2023-01-02 2023-01-12 #> date_first_contact date_last_contact ct_value -#> 1 23.6 -#> 2 2023-01-02 2023-01-05 23.6 -#> 3 2023-01-03 2023-01-04 23.6 -#> 4 2023-01-02 2023-01-04 NA -#> 5 2023-01-01 2023-01-03 NA -#> 6 2022-12-29 2023-01-04 23.6 +#> 1 25.2 +#> 2 2023-01-01 2023-01-02 25.2 +#> 3 2023-01-02 2023-01-05 NA +#> 4 2023-01-02 2023-01-05 NA +#> 5 2023-01-03 2023-01-04 NA +#> 6 2023-01-02 2023-01-05 25.2 ``` In this example, the line list is simulated using the default values @@ -160,7 +160,7 @@ modify either of these, we can specify them in the function. ``` r linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, @@ -168,20 +168,20 @@ linelist <- sim_linelist( outbreak_start_date = as.Date("2019-12-01") ) head(linelist) -#> id case_name case_type sex age date_onset date_admission date_death -#> 1 1 Dakota Herman probable m 11 2019-12-01 -#> 2 5 Jose Dick confirmed m 20 2019-12-01 -#> 3 6 Fredric Mosley suspected m 38 2019-12-01 -#> 4 7 Ediht Valero-Zarate suspected f 71 2019-12-01 -#> 5 8 Kia Ouellette probable f 29 2019-12-01 -#> 6 10 Mukhtaar al-Samad probable m 8 2019-12-01 2019-12-07 +#> id case_name case_type sex age date_onset date_admission date_death +#> 1 1 Diozanae Ingram probable f 9 2019-12-01 +#> 2 2 Alexander Ho confirmed m 66 2019-12-01 +#> 3 3 Olivia Valle suspected f 9 2019-12-01 +#> 4 4 Anita Roberts suspected f 41 2019-12-01 2019-12-16 +#> 5 7 Aqil Stratton suspected m 27 2019-12-02 +#> 6 10 Irma Lefebre confirmed f 87 2019-12-02 #> date_first_contact date_last_contact ct_value #> 1 NA -#> 2 2019-12-03 2019-12-04 25.7 -#> 3 2019-11-29 2019-12-01 NA -#> 4 2019-11-26 2019-12-03 NA -#> 5 2019-12-01 2019-12-07 NA -#> 6 2019-12-06 2019-12-07 NA +#> 2 2019-12-02 2019-12-06 25.2 +#> 3 2019-11-26 2019-12-01 NA +#> 4 2019-12-04 2019-12-09 NA +#> 5 2019-11-29 2019-12-01 NA +#> 6 2019-12-07 2019-12-11 25.2 ``` To simulate a table of contacts of cases (i.e. to reflect a contact @@ -191,24 +191,24 @@ above. ``` r contacts <- sim_contacts( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5 ) head(contacts) #> from to age sex date_first_contact date_last_contact -#> 1 Hannah Johnson Amie Ismail 15 f 2023-01-01 2023-01-04 -#> 2 Hannah Johnson Dravon Snell 13 m 2023-01-01 2023-01-04 -#> 3 Hannah Johnson Travis Terry 34 m 2022-12-31 2023-01-06 -#> 4 Hannah Johnson Marilyn Harling 56 f 2022-12-31 2023-01-03 -#> 5 Travis Terry Daniel Laima 3 m 2023-01-06 2023-01-09 -#> 6 Travis Terry Sean Brendle 84 m 2023-01-03 2023-01-06 +#> 1 Zabiollah Ly Daniyal Fifita 54 m 2023-01-04 2023-01-09 +#> 2 Zabiollah Ly Tyler Mccreesh 45 m 2023-01-03 2023-01-04 +#> 3 Zabiollah Ly Nicholas Coors 9 m 2022-12-28 2023-01-01 +#> 4 Daniyal Fifita Julia Mcmillan 81 f 2023-01-05 2023-01-07 +#> 5 Daniyal Fifita Savannah Begay 35 f 2022-12-30 2023-01-03 +#> 6 Daniyal Fifita Cleatus Sorrell 75 m 2022-12-31 2023-01-04 #> was_case status #> 1 Y case #> 2 N under_followup #> 3 Y case -#> 4 Y case +#> 4 N lost_to_followup #> 5 Y case -#> 6 N lost_to_followup +#> 6 N under_followup ``` If both the line list and contacts table are required, they can be @@ -220,41 +220,41 @@ the same default settings as the other functions). ``` r outbreak <- sim_outbreak( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death ) head(outbreak$linelist) -#> id case_name case_type sex age date_onset date_admission date_death -#> 1 1 Y Nhi Eisele confirmed f 24 2023-01-01 -#> 2 3 Rorie Lawrence probable f 43 2023-01-01 2023-01-06 -#> 3 4 Wahida Bui probable f 16 2023-01-03 -#> 4 5 Navya Smalldon probable f 17 2023-01-01 -#> 5 8 Sebastian Padilla suspected m 88 2023-01-02 -#> 6 9 Lizzelle Schoon confirmed f 40 2023-01-01 +#> id case_name case_type sex age date_onset date_admission date_death +#> 1 1 Joshua Claton suspected m 88 2023-01-01 2023-01-06 +#> 2 2 Estiben Alonzo probable m 73 2023-01-01 +#> 3 3 Tulaiha el-Basa suspected f 75 2023-01-01 +#> 4 4 Marie Faisol suspected f 47 2023-01-01 2023-01-06 +#> 5 5 Jera Ortiz confirmed f 43 2023-01-01 +#> 6 7 Evan Sailor confirmed m 5 2023-01-02 2023-01-03 #> date_first_contact date_last_contact ct_value -#> 1 24.2 -#> 2 2023-01-01 2023-01-04 NA -#> 3 2022-12-30 2023-01-03 NA -#> 4 2023-01-02 2023-01-07 NA -#> 5 2022-12-31 2023-01-02 NA -#> 6 2022-12-29 2023-01-02 24.2 +#> 1 NA +#> 2 2022-12-30 2023-01-03 NA +#> 3 2022-12-31 2023-01-02 NA +#> 4 2023-01-04 2023-01-07 NA +#> 5 2023-01-07 2023-01-07 23.9 +#> 6 2023-01-01 2023-01-03 23.9 head(outbreak$contacts) -#> from to age sex date_first_contact date_last_contact -#> 1 Y Nhi Eisele Najwa el-Mohammed 49 f 2023-01-03 2023-01-04 -#> 2 Y Nhi Eisele Rorie Lawrence 43 f 2023-01-01 2023-01-04 -#> 3 Y Nhi Eisele Wahida Bui 16 f 2022-12-30 2023-01-03 -#> 4 Y Nhi Eisele Navya Smalldon 17 f 2023-01-02 2023-01-07 -#> 5 Y Nhi Eisele Cole Batmanglidj 42 m 2022-12-29 2023-01-02 -#> 6 Rorie Lawrence Aerika White Bear 74 f 2023-01-03 2023-01-05 -#> was_case status -#> 1 N under_followup -#> 2 Y case -#> 3 Y case -#> 4 Y case -#> 5 N under_followup -#> 6 N lost_to_followup +#> from to age sex date_first_contact date_last_contact +#> 1 Joshua Claton Estiben Alonzo 73 m 2022-12-30 2023-01-03 +#> 2 Joshua Claton Tulaiha el-Basa 75 f 2022-12-31 2023-01-02 +#> 3 Joshua Claton Marie Faisol 47 f 2023-01-04 2023-01-07 +#> 4 Joshua Claton Jera Ortiz 43 f 2023-01-07 2023-01-07 +#> 5 Estiben Alonzo Kendall Jackson 49 m 2022-12-30 2023-01-02 +#> 6 Estiben Alonzo Evan Sailor 5 m 2023-01-01 2023-01-03 +#> was_case status +#> 1 Y case +#> 2 Y case +#> 3 Y case +#> 4 Y case +#> 5 N under_followup +#> 6 Y case ``` ## Help From c180349747330bdb14918067c70d9192c453537c Mon Sep 17 00:00:00 2001 From: Joshua Lambert Date: Fri, 22 Mar 2024 14:51:54 +0000 Subject: [PATCH 7/7] updated testdata and testdata README --- tests/testthat/testdata/README.md | 6 +++--- tests/testthat/testdata/pre_ct.rds | Bin 2167 -> 1687 bytes .../testdata/pre_date_first_contact.rds | Bin 1088 -> 854 bytes .../testdata/pre_date_last_contact.rds | Bin 970 -> 757 bytes tests/testthat/testdata/pre_death.rds | Bin 1410 -> 1095 bytes .../testthat/testdata/pre_hospitalisation.rds | Bin 1301 -> 1002 bytes tests/testthat/testdata/pre_names.rds | Bin 1547 -> 1210 bytes 7 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testthat/testdata/README.md b/tests/testthat/testdata/README.md index b42481d6..a25b50ed 100644 --- a/tests/testthat/testdata/README.md +++ b/tests/testthat/testdata/README.md @@ -25,9 +25,9 @@ contact_distribution <- epiparameter::epidist( prob_distribution_params = c(mean = 2) ) -contact_interval <- epiparameter::epidist( +infect_period <- epiparameter::epidist( disease = "COVID-19", - epi_dist = "contact interval", + epi_dist = "infectious period", prob_distribution = "gamma", prob_distribution_params = c(shape = 1, scale = 1) ) @@ -49,7 +49,7 @@ set.seed(1) linelist <- sim_linelist( contact_distribution = contact_distribution, - contact_interval = contact_interval, + infect_period = infect_period, prob_infect = 0.5, onset_to_hosp = onset_to_hosp, onset_to_death = onset_to_death, diff --git a/tests/testthat/testdata/pre_ct.rds b/tests/testthat/testdata/pre_ct.rds index 32794672937c50476e82f3399fc95a6c41d8c356..21d677621e3877832d02912535b41ea1ec85fc9f 100644 GIT binary patch literal 1687 zcmV;I259*oiwFP!000001I1WvRTH5s&~#1SA2H0jjZ7KpJ^21CR+Y0kVia)owN*2QUUO7BCL*Fd4@` z-X@*@iX(^*fguW#2vS3kPR0)f^(BjpuZ>SX!tsm|kT47q$@t^Jf;wMGoZ!GV1=~qG z(IyHCvMEuzhfyE88KbfL+kIaniOrRfY6q%yypCL!I~iBEu-+?{yYlJIA5!12+{)C|f-d}pwFN7lY$HlgH`d=#G>kFE)^uRYR+}XDR_~s|a zca#ACeXMOsyxQLK^y)Lfx8B~`)CzpB;r&N%tL@zKG!yW@TdVgp0pC7-{g1tB`{%Cq(UByd4RBX$Aj#bY0q!D6?;=U>Izd<=td-ODhCmTe?k36a`jl`JVTlyMwLtQ_ z-z7yr+mvZhw34E@LD;D#KakwG{^Sr%2+WGR)o><2T zK0m2vovG!=ogph;Ggu`JKz~D|1|B;_7BHwd(YzT zUDtPq*gH7!@?j;qe%I%}wmDK`9cSSA?pF@Cru5QwtSexM-+6hL+AfXOj|a^$u7DY( z2ytr|#OK%8?VLcQ=3*YNMS>kmOtn*Vdt{OJWEAs0*@>J?vEt$cnM%t=+37{hv$6+C zO^8TM#fay8pj(M#o2V!pk*8O2e4T_9rb4v2sEKUVu#A|Mq7&yYkwl@96Y5D{>IxqRmkSVl8>q6B;CL+&V%<%~EYN(Z77>S6} zD!eu%Gu6l;`lu|~>O%r!hz`P^Q? zE;3f+=A_^xnoC5lqzKr@lp>o8^Qs+MP%v-(a1B{lQKXTJDi&$P0{nla5vnwTC`uW| zCJrmm@Jbw=B$oP(CXZBu`az3MG8`EloaBZxM^V&Na2F3xb_Th zP&hY@FU1Z!MXe~vn4b94slD0|wJg6HoEeqc!T%4K{T<+cSWmo+*V0=kGg{(KQTA{O zY!z~-iwSm&6ld`L_8UcZHz&&jIssSxiovNvGOkspC(QQ{VL(gqd9Y?;lO?fnCY@aM hvsu3hejouIQMOgp12oeiskUKr{SS94?+OhR008nHKTH4s literal 2167 zcmV--2#EI|iwFP!000001I<_sa1_-Y-y|23Tt3JLDOM0yAR5GEDyU$syvr9P!32_v zd^k+Q%iZQ~lfB)ryGKasNNfhQ=-@a~hoLBbrmZ3^jPy$;GUC(@8V_Rwli)NF+vFkz z8Y$(Y4)(vd@7>4dj@)4wdo#cM_Wk$md;j-)|Nq;6c8!@~m;}ZYpTHy}!X=aVaNW{^ z#bC>UMm8WFFc%O9i1&477?ai!Fa?kVNCu<;w82sVY2>*Kz*ImcAd8HrjXMpH3-}&j zI^ZV2_W?HpW&maaZUM{!+zMa;w*h7Y<`92;eswUuUtExX!AK19lOj0`%*4l>AW+|? z2l+-Z!+=>qz8dwSngzoY28j_sHKw3i2kT9dW;G7V8>wMnEIoneGUSIY&fC4_?AIRTNkU`hqi>;e_uOGE zTbzk{cA%5{4$MI3a`JnBHTF0hEFui1Z>{}KA4IS-$(96^0~Im2C_ zZ$+L1(^sq8>d~dA>*svB=0P;t`axFqrlaV;9X0aMQ_Ikm&O^dOJ7=M>Q#U7XOZHfp zwo~2VKRaF4|^0GZU zoxo2lJb5J%`X?vMUvd@NFAYkIJlb=bQksAKi_bm>+;zP2$Zvpu4odw}^Rqwo%|8L3 zy8F>*s(=ri+dexF_-tI+hd%}WGGlE20^kpxbk5F)@e@4Lmub(xdC#=|Vr{)&pQ~#C z?wR+`gC7FFGWUt|-N27mTy!qd<}JT4wgS$%c;CUO$62CHz=}dnCTcX5VwD5FN`r6n zzcfjcUSSMBe=tU38kEN1G%^j+3D_UJG$?5h8rc|xl#M}XWEzwamz(#z^W z=zYn+jd~DzAJ&7=&kcGIdSyKby}S*7fsR2=5Nn&7b5%Pnz7r9}_)^ej`^2lcXP}$xd}U7OLL})v{W_Kq9p^`zfX4-`kI_?5!!i z%ltk)t0|)|;{JG_sXWz^ll}JYPf$O#TN2ZXR`3Li7YJO;ZezMq-^W*1N zaQV68>{Eu)-a32dm8i#=cDd{PmTn>1{*2)rcHREpU6%XE{Z~hBls?}z2Nh6z5BD|S zq7@wb%QAmU&*Gpnxhp{yQs6AwKfj`9TF^T$zrozy6KJ1))r>3ZjL%ON!+Zxv?fvP*G1bu)_2(TukZ9HWvjM#+$jCNYmV_9mQ^NfI;9tOp^rBX5*ZNlDcAk2WTI9l_9kZp9ovtvm zj&E$lVjEi|JKUTgNOTRQFasyBm6B6bRR6FU;09KlJX`H>w{d>!T3&Q$9$T?9;8?cR zi5oCj!HZh#bOr7tSvfG5)49x#V3A{2@v7WL6{v!3qAJq8sB+)oR6ul=6JYaPGNwzl zVi`NxrCbxpLtRRE6=NIKBMWqImLxq?Dsh8905gka zURAZtuHyv(_QRhZ43qK={3c41nDb|{>=805mPCu*7%u%L+ZH})!{^cX^oYh1bykG4 z#gG!Q+9RaUq?p5H*aS%zAM%1ou}NYhF9!lI$Ut)>G*^;aWT^o+2;8`KXuoTXObm)! zX`!F%LZ^zv6FwN_BBEJ#w96PTKtyjR^lswyhJJ?Xzl}21k-wANnyi+jj#NI_^$_!fm3L z*g*%H>XeigUc~~h1iLuJ&Ouhub2q~`D7L$JI8FS0bXR>H{TgG1tJmZi=X;P*@1?f2 ta0X#hWT~}~imUx28{YwcU`IZSP=IM3;KD{(8ym{7{{aU8dU|?WoU}0irU}gm}8CXL@+;lB~V!}WU2N3fDu@n$9 z0x=U=mHUjCtWh+#E zf%wW^JOV)a=Y){iRY3aJzBljYfcR@~_W3(pdSR58DbEU|)y=${4g+b0pc9i)fV4@* zy48Dtw4vAOAB%u=?eoP-mOxrjW(MCeAg$3nb#)w&R<39D3I*|X7x9$%)38VJ}Qk!1klLGMWZJQ7!8elSmf6KfcOg-I1JE8J^-O# zY=lJeOG60#0vhQrpppJ!3zRN_(&*waek~*s!04CI$bYd5N>@SYB4{Fb0EzsU3!sSr z#)r|cM6nT?C_X~z3{d1lBA4+$?)XHF{Jg~6R9NJ5Kn0mH(F&XVA}F6LJvA@2D6u3n zKMzNtz*3T#n+j8%0<<(fKd(3yR)p}v%!@}-CJ0srOoS!z@Dc^Zk(@>O<$5rOf+`&* gP=5UX|Nk=_z6DvFsFzj*)B^G|0569n3#tbI0ERGy0RR91 literal 1088 zcmV-G1i$+qiwFP!000001I?9xOq6vT$Dg}2YVkI9!KR`kaPz8UxKq zpYQYie(B*EH^*9A&-U7j&$I9IJfG)t@8?Ugnd3ME$LkH8!3ckH#`Wt~<}QYF7AQt+G?X0w4g^tw1;E)WkS0Eqy;?>yjM;65M;m=D|!EC7;$ z6yO0M6<7$Q0S^M{KnCqc>8qAg4xOq$HAYpR4AV52X^$2athXdpZ;WIOsj6PJ^I|ho z!%u@T3T(yKLcT?Q=MN)0Z>6`fkf-_V5{% z|L(p1$5Z$(XZX*($OoLs(F2X;>@B`_TS8I{ikQ2;L?eqHE?TiT9(6aMf!4NUG-AmP zd>+|`zU|wv@?@|O{b~K7G0?!F-g>^~)bj6y*b`}cr5{t!*Z!QJx`W#V?ujo1_h1kO zt%ZN{(lrMZavya`XwEs3*&EspVoFlG>79^wrzZ_`CLu^TkV1xcYQL z;%i;#ui8TI;5!BAmcPB?xyDo!8CqbfH%S8b`j9+&brt%p$y~8NKZM56lAif>R&>Mm zX0G>K2whBEe)H$iBdDSIRewd`B=RoZQgmwgCVbP%oP@w-Wj_L6XnEP$4&Lo=9^Ve` zC|}c358lyr||pU9$B{$+@16Lu`}QUnLBQDfVZt0E6>NzeP%TBJnVCNWn&~cGde3A zRaJCnVkh~h9X=6!hlQ`^4?NPC1DxiV3}ZC2P-?@eH4EuoJQ-dVN)|$`wIO8IhEQu3 z$|z>x)P|IWuV$Rg34RBZ99~AkDQ~5wH4CZy0&zHgYAv&R zn1ok$kWk8LB!u!ljY~-g<@F?llio-|D0@i=<{B%O?^5 diff --git a/tests/testthat/testdata/pre_date_last_contact.rds b/tests/testthat/testdata/pre_date_last_contact.rds index e43d14aea34ac5eb167c164c0ce451ff1b748d16..42e503335f2e6da86037f11102e757b42b80e862 100644 GIT binary patch literal 757 zcmVfiwFP!000001B>8dU|?WoU}0irU}gm}8CXL@+;lB~V!}WUI}q~%u@n$9 z0x=U=mHUjCtWh+#E zf%wW^JOV)a=Y){iRY3aJzBljYfcR@~_W3(pdSR58DbEU|)y=${4g+b0pc9i)fV4@* zy48Dtw4vAOAB%u=?eoP-mOxrjW(MCeAg$3nb#)w&R<39D3I*|X7x9$%)38VJ}Qk!1klLGMWZJQ7!8el^gzf<%uR&_0y|WYDHAQz zbqX*r1Q(;+&7iL~OSQ)BYIE(Vj^mtyL7M8w!ZX4}~l=aj3W$d@gg!taFBe z8Go3tS`KKWt(Gd&k%1CXnUN6LLYNVC$~KKIkU1A6u%JL zyhmSmyU-Z2Eb)?0zI`sw``*)UzxOs>$1seFVU;RIrN)npdR^Me_$7ExkA(&aK%x-^ zq7<7Mh9!;28@?VbG6^A@O-82p)=fpGA%VzrBnTn<&OqKo-a>+rnaC_81PMjLkl9E$ zG6#u3<|2_uly4q!t|CUf6q5O*s3mh!wBw-j&8U|^XA73hMhTS>E}2#C7xhdEI}U0; zP>(6pYpLIqDKY{i1d4O9;ySIxmc^T$e5RjTW47CzCbM(=a)PU0)jqL@PpJHF-|IDY z;s5mTpS{Lj;AqBo!ARV}^!v{R5H#S`HJ^f^h4WKaED3~`3g|jr7YalASl9R79q?<% z`jw6D6!^<PlUma0`0A6|N<;a8NJU2ldlVa0-Uc_SA<#kNxa71DhU#yRE!^(WZA{ zd-k!+pJT7V&5bdp4(EbhJ&{+L|dvAIA&Yl;PBm5aJx#EdnC~VBe1k>W{CkF89$GAw0fX7X!(;H z!?jRRy|p;k)d-HHg4CvaPw<@+sCTA%Yu`b=yeB6z7WY>P!O3L($%QjI-y`4m z`B2&h)RwqE&s;@48om2b1L}@dBRPrWxgQLB*Wx*+6c5I+oT<&Zro24g$wY6m@0*-F z>I)ja!Ux1s%~3{ny$qv2rJSY!hV|$FJ>O*KJ+b)edk$`B4Eejxc11WqR+_xG;Xt zEe;czwY{=t>`JQ?*wMWUcx0bC%4F32#w!U5D)$9CS>3rnJ+_(9W;?8;Nzc=xB z|M?G!Q3V&#prV;bPjjhhI2T1<8 zTfPeW0>ZlX8Gb%15Y8U@w4rAnVT1jjRK9N~9CxPt>h@oV#l5&m5`QHQ;yiR|-Pgpn ztnkCxkF*f;(9my#El)!dtA3H*h`OnOH&%oTjKG^$?;NfL-ump+{%3&ybYEU+QtVw% zZn^**-n}Q>0~~4k_@Ud1?W(lef&cEQZVv-*pTF_vA;s>x{_Z-`8(ks>W^up;%T~Q{ z2{^mztGzzp()yDp&H+m*zZvcT?udLa_X*&fnFnoO0v~SMe_|8R)yh@YD0Xp&O$L^K z*LJ!cc+{}+N-1#Lsjh_v;Nw9tQ4O2WsP0-VjGT9iN0M-R(MtANk1PP=G`OvQDX$=_ zgVFs)gRCbFdZwgFFq#ZB_^BLA0t|jS>XU*JgHMCoI;{BxFNeV(U(^`w(SjT+(HO;` zM=|KpGe{Y!uc!77EeR-N82sqx$S^X5NzktaKXwF@fZCKaDS9v|ZX)ZI;A_D(B+|!I z?{|dyO_QAZxlQ8$wU=VDQ@?cfxO$rW$e0_Gp8D_B`Aw5v#~8I`&F=x~FK&uRhJL49 zABM(p1%LXQ@r6u=Pf(a(=1kVgWKlmec0pHw9s@lJDgl*&mScGdqg}4bhs6x+SBh`z zc}Ba`7lX=i{2I`UAUGb?4-(~LU@mBt{-mHJoOS3*xWPxb(!Og|$IA5Wlab7?Sbf2F z@#v`S*f8`~v)h`szjJNbftR}mr@GGQ_*sM7?I(XaFm~dl9+#r0QJ}}A6)TMa-Sr#{ zp`Ei?5QUIO4g|$C*C;Co8U@+Mzc11EFy( zCP{dW7CoEkMEUhWX=_0CYzau(Bc}SA9SSxtqW&t$WZVgVi9})`&303s-?PXcf+1kV N{{xD~Q#2zB003BeFv0); literal 1410 zcmV-|1%3J-iwFP!000001I+P4W@)DrSU3;*p;xF2|x<;Uo6XF&Qn|982Hf0B1jH_`n`M zpz!hD>wm1mf2ra9wQvE)FyuhD_M^^;PcND^B?L8YM;8wq8ihJl zam`=2HlX7dmd!raszHCMf2?TU&Y<(}m#op= zidxm7l06wyQCso5va6MK$aVPQqB%*wBKs%SGf9mss`b5``Z%xS1& z&8eZGYa7sC#Tv8yy;Rg)QfqjrA_BSEM=Ht{R+f3Qox61{9sO3RH0(-lL$}e?mJwxY z)Rpmeg1M;;T@FpT`^&9^XnXY=C5Gl>$UJS`q7&EeLQM-gvCU3lKLWl~^IA?V@Ya&* zJEg#N`SWVZfwwe_zJ7s^$7()X2)t?4f#_`DrlV0g8NfSurPyY!z$SC7hqx@V;q@el zB}X!(Yap)Vl>)8?rLF=0aIRo(0`RWX>WX~ejY$`~foslZ)PDv10Vwr3pQkNg@Ats%&#v1#7x+-;mZ(_Z8o^?d8sL>3B@cn zA!V@%#Y|1iCZ*;px`TCsABUK*gCV>On~@W9IN>4Kl-xYb9n-Nnx%GreOijuy zz}yky9dk6kj?K$yu_?JoY(j3Qh;y+Cxh2?yZeET}$eFPTxtqj{ggGNNrJD~BRuitr z=IkiJ%n2sN=9BdL_M2Eo=W(nb#}cmc*3DhyL{D1Wj-(hOfs==f`DeEVbn=i?A9LmYJhZPg?st=XM?9UuoipDVj|02_m_hE%V{rG$cYO;0 z695?u?pFEEneQ+s0bT~Y!r+cOmciXQ?|ThkAs~&6gZ}`SR6rsioji9AbHAGvY6Us6 zS0352&xX49X=YAPo}_y0ILc;T=f&O(d(={aK=*GM=Ra&Gn?Z}V>Qo< z=l@&Gs$ShOUl%w0f$M|pf%|Wa>+bhD!|v8}mDU;hJ6`<3GinQT^n({jF8b+3J)Fr* zVr8Drs55IVdXv#dmnXC63v_h!3MjxVld(`o`?w&wUY5tOp~5iu@LICGyS`B2My}rc zz#VC!ZY@34=Fx?M^G$`T^%ku`Ux-ume%HZf(;78>U*5!i#qg)MxA&5d4TR5MtIjpU Q6o`8M2Cb^7SC|d}0ND=6;s5{u diff --git a/tests/testthat/testdata/pre_hospitalisation.rds b/tests/testthat/testdata/pre_hospitalisation.rds index bd82e3b1c32aacd9fa14759028a14242434bb121..3521406ff9527d69c7851382c60079e808979961 100644 GIT binary patch literal 1002 zcmV6XcIvc$2ZAtnzlAgW9w18uhk7*e?d}_Gx28sL z;m>d0>>T^%y_wm(IEG;i468RV1`di0mzy&sZ8X%i2O}Po07?bvKzgMy!?1EgkP#FE zGJ#@2aoDFF_A`SLK^9OF$O@9jO$McaI)FNYI)OUlJj#3<80FES49&zwkO>vvObIxD zbJ1@}!uhrS>7$&F`-6;sQ4G$X3M0ttWpaxy!66Awv|}6|QL;Ov2(SOrylwLz2m8OT z|Enke_9@Y}RA-)=0nbuzAuW`@}a8BV~=&b&xe*3I(8lHLX0!+ z+Um=!gl)LFA}@C*VdLgor*Ez##;qxjR{J^-X|`#F{V8sg{0(we8Y9xhN3M z;yu5tx({JJ^(V6SS_sFT%e=Sl88KxHDfEfYiIpVpzc%X@F^^0+(qmvTF}{2E@^$e< zNMgk=Qs-AT74YrYq9i@=gl#wq%JU2ba&@~{YGYQyawzs=f+MaaQM>G6*a*0 ztlN#{!1ew^y~Y50cG+jX4(wmLr(zM%R>EcF%63}0SpsH0C_P&SJgl2`X9RHNnNtIF zz)>DCoCBLsuk2bijGSY+-RHyYMJw6Kc1Zw+XmCqD$V(7Y&S;)rLDrH6JzCNv_>~Ma z_$~Q62{8DPs7(q=3_cBRNu%l)EDnP~zN#`%tp+)mt}=i@4`9#(=a3RoTTkuvY7$Te zG5CQ?$ReZ{lb~J=e()eB0ktV1p?H%)Tt=Sr0g)E zPW{r@t?Fs=BZC>3^wj?hjo&osH4IW)QvGhA{^F+aN9lKq>qA%2s^E%T)4C8%_cjV` zj2z8e(M;-MeqYd2LBl|UKi26}+> Ykbm-r+6TM5&_&L|pXpATEi?)M08}#ekpKVy literal 1301 zcmV+w1?u`AiwFP!000001I?EYOq69D$DiZw;yeWTqhUgb{4vP5Ezq!;JXfU1nIxh` zn;V|T0XN~!jw`I3U`$kMIu|uYEYylh7fqJclA)894aH+;zyKFW#l2`qr!mkR^n31k zp7ZXNQ^~b;+h^bRcklDO@AH1|`@HM z0eqZ;5t5OCz(as9pa5n7N;YREn->7g0s?^`AQ&Lmoej(Z9tJ{zxxgd9JRl4R2Ob3? zfcZcqumFexqS<ncOekHl?#?#SKN$x%#!lC3es4ZgNex3zJ?L`1l)RqPk{%pKVj z$i2Wl=5Vjw{pQRR;qOMEb6qm$JcYrSr`K8Zxn62toylm?>MT>2)0};;;nTbMw8{s2 zuK%$M|D}hwuSGX-3}PQV7GIlv^_CS|eX&E?`XwG&{8-kCrGdDu3imcNhT)NrINRrr zo%mGO#+4^~GVx!kpQ>$D2zOS>N>8W$p!PozS!+EXj=w99|GBMaml{3wh1%HPgL_oL zk|UaBxUX!l>~c*rc6{BNwL0lH-2bulTvD4FH(5Y<(KPng2=dH*x3iuUlfZUFsIx5gRgCf2jgn8$(~VROaCEcXOgIWG}}zG@i!q+u# zC79d$@TK6?8^4Sm!&P;!mlxVjV)OFtS*M3@z@B#cq_)|e?<3HQ^{?uhK=+r|jqd_& zF36~_1l`vXr@efVv{G^|d6ZCC4?= z5~yp4Q=oO=)D_SlFBGjw06mmeS6u+QJE`}k9L6i8i&7?_KGm zt?$&ddXSd(c??DHi+`fMeXyeGfs94aek`-s)2E82MIF<-{W=}y>99&;& z4NW8Sk1n3w{TzATTO;c?gSN&0ar`Xk;h5dmn?ZM`j};`7`>q;wya?|(ALoma=1i_D z)D{=BHxvI-_Po}j2c6*IEB%vL>U$W8KCUo&QyxljIK|3CdJlDlmxq#vP^{t*autVA ztUQ!nl!sFsQXan2aq1KNI4p!ii0MWeMnSCMOao{rg$$}gDKwnI4yLT;Ar;nA9SZcU z1zr!+@CsTQN+FVlP&g>kJQ_k_0}Y`|H`5RbW*S1_8Ve&+!AL{t(gvm~rY$s_L*-Nj zXGm%IB$M9rCic;Oiuxz0nbvyx=Gx@UPrkVa&oe)nfA$HcY|{_&&CY#m_w>)seN13J zE?}FxpZT_lDfe|D+sqxzzd3AEv&}3dGT)dEihQ&)|LmgLsZ=Zr1ZfZqyd(`HS3- zed%Km^(H1WtCjhBqu#8w7)(Yl-HXg(DAM!Mxe%-zld)LO`xAeDy&Sh;LC#_D2gQ=( z+06tyPvjZQcbt(H>$mYkZN6UgP&3S?5*2?i@+S$_Sq%UH-cFJk diff --git a/tests/testthat/testdata/pre_names.rds b/tests/testthat/testdata/pre_names.rds index 0890ac55ee4f59a38b2fdf3cad59b554f0078c61..23c11553f127d18d68c021ebe71b9f1c875a8c26 100644 GIT binary patch literal 1210 zcmV;r1V#HFiwFP!000001I1Q-Y*SSffBkq}_tkcF16+`=y1|Si4B5moeRpb{3>Z4M zI80>L_H}E1I!030NjoJi2im{ z;!lC0ihw!_v>2%oNXPyoLDrIi{mbK1#_5l~2{bW~g#BlO1!2Fm4yT>9@~jQZNmiGW zw^;co!!gw7785jfdxvjpB#A90UTvvbvnl*zuIq;PpqDN)H@GvtA5-6CCiA; z-1y_~3UsQRnOv%Wwy*m|CS>}3QMZ|9!q0z{{K%1anUHp%RZV9yAzN1NaPuonsPFT2 zUGpz7q54Ma{$mS~X4AK(k#-|ekM?h`uG)vxDO-#iU++emx3UJCxOqsEx1}Ys_#UJ` zebrWKSdP@D{fePeETRqWPwKrnNbMT=ul)zUmUO!R|eD%{4ZI1!})7QUVCCGao z-g*{z;+?%7FYsjJ2lrkRWK&t10rRoyC=;m?b7svo!TEO3Y5VzawbWSmq`&!6$45BOr9ESZxCn?$m=uK<7sVCKbwcu` zdr6r1&uh%(&=D{AO9)r08WFATlq-Jxb!m zAB8W@xMy4+iiTMYd-R^!jd-Td(U`+>Jig*_YNw_z=u*G~fcpUjfMUQ}++Iydm#grw zSb+5k@oqgsNtgO6Knb3|3Gf^Mjz{r9B0L6`0XE1_3c`p^3tsTl+Yntie5vACv3xuh zqukPsXKm+>PRYingKspM)1vBUmKPs*p=T^nKU4D;kL@({{&XPX#JhQ1IR!<%<()&f z>gP_g{3M7t30KrQt=|LZ_5SN=laI$@G%)sL;NbY72z#B2hPwFZ`u;C|>$j&S>Sua> z;MFc~N|4Bjo`4bS&dnX{AH3Cd+-Z&-_snbGX=z}|wXesWN{8&3>2hN^rIvNFZVT^l zIioxW)x4vDCE7M{TH|tZEO|Vp6MHogY8j#$JU{rFnNLllIAC|UXN{;h_GQwv)DlDb zIv2Oy!CSUDxX2}HY^;T^Q-lrw9}%SIJRuGM0Oa&sGynhq literal 1547 zcmV+m2K4zKiwFP!000001IZVK!r(B(M-QJMFjH)@vp`S zS6JZmxYN5UtsKP|%*erUGRGkbe~QY#!jb-D&`~EF6i+d9KqpX(TO=hkQ^|qe-S7L3 zW#tt78M~Q>XW!lT`}W<3=lk~E1v-Xd)QrYW&8W3-$Y|%znG!Ju&gmiW0eArh0aO4t zDVbq3Vj`d$z#ZTL=nfDk>jCg2W|i0SqMdNOfg0(oZF;PY$iDP703>pd&TvWuUbM%4(zNqd-4dtxCP9W^!mc zfYt@5#uQX*x!x3>3V6xjE7hfu#(5Y_seH1HPjL~uC!0++F4@*`*u~KgOYhpvyA(d& zbN!E1c$ylv&4m~6Acp+V?eP2s*YDYp-5oXQ%J!nhkuN01jPXU~o6&`R`}?3qeOSd; zO>5EN^9!dOs!l+ENB*+4Vl#uzi&ZgvT1`n1sx^QAiDTIf zR9(60+^A(^(K~6Mr+gQ75?xsu%AIGAqRLQxUE!s5$i6>tzAYyS-Pw>d@a%%|sD8!q zo_;IK(7%}pmf8{gJ0LZjY`(x6!!DUh5*! z&G>gCET?PGCBI2`f4fzLHW$2=Wvn=aEaO)t9=UcG*0iJ(Tj7xQBjAgL%acohH)a*w z$p$V>pHY|toLkoa+IcY^obbhL;Pp%Q4O|3#`d~#mRr5b>LKASN;0(g6D!Pa!(_oFT}Ya!o5J#<0~#M^4j(ROj1sFYZr z;j>L20T-T&Kl%;u$Dq`gVx3hzcK-x?dHAZ0(}DLl=7xj>_;N$Dl zL&9KwwLLIa9KU;{f7L7E^WJNmvlzHM{LkVOz&i%Lf3p;LZQSkjXz{*NZ#B(?ea=nV z7_rZ^$wtm%y#MGq1 zEX?)3?PGz)*RXj74x3U4#wHZDDL56IP?(EN=;X!Ngn|W|P`E+NNLVmoQ#yGc;Yh+q zu{rCrFbk4NvH4W3uKlLe(Qz2-C$NO`+w10B#kqT`Q1hOI$-{KV=w3}3T~YlwS~Il=tM@yQe+E_2^Q_i$;{2*lmpJ1WH-u-0 zCcLB^|D>4Jzp-T|9~N-m`EIqId#?{^?({tVcMET3ml`{p&nVtuk6i!on1I*Ewm6=a zKF^wE4b+~)l}r1I4M$Oo@3(X>mhH)fYKyTu>_tUGqZ!`3ybJT#^UPxwb~eAO@32RIzJ@a~^KvtvmVVEgAFgBjM%Bb+ z@U&6&At&7oif=Eog~Ylv-o#rto55^y@pY!L88Ud9odP#aGMlVC{r>Wz^CijBdP-@~ zFx!&af35jR7g7zD`>v?1{7QPrrO}Ce(#_Uo1{-HISmh;lOW`?Nx|KxU(xhBUhQVrW x%fY2ei3)|fTg)pWsY>E2%PkZBw6?ZhbRo4k6&IOmfgz&c{{dOBP3?vf0049I37-G}