From 88a24bdfc1ba9d21f3c14dd74c3a5dc36dbdf23c Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Thu, 1 Aug 2024 16:11:50 +0300 Subject: [PATCH 01/61] add error message for missing strata --- R/est.incidence.by.R | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index 6395f5b3..630aec53 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -49,7 +49,7 @@ #' curve_params = curve, #' noise_params = noise %>% filter(Country == "Pakistan"), #' antigen_isos = c("HlyE_IgG", "HlyE_IgA"), -#' #num_cores = 8 # Allow for parallel processing to decrease run time +#' # num_cores = 8 # Allow for parallel processing to decrease run time #' iterlim = 5 # limit iterations for the purpose of this example #' ) #' @@ -101,6 +101,27 @@ est.incidence.by <- function( return(to_return) } + if (!all(is.element(strata, pop_data %>% names()))) { + # search strata variable from pop_data + strata_var <- + grep( + x = pop_data %>% names(), + value = TRUE, + pattern = strata, + ignore.case = TRUE + ) + + cli::cli_abort( + class = "missing_var", + message = c( + "Can't find the column {.var {strata}} in {.envvar pop_data}.", + if (length(strata_var) > 0) { + "i" = "Did you mean {.var {strata_var}}." + } + ) + ) + } + .checkStrata(data = pop_data, strata = strata) .errorCheck( From 5ec8ec055ee1f6ac7d9c13c775327603a3d9a0d0 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Thu, 1 Aug 2024 16:45:08 +0300 Subject: [PATCH 02/61] run document() for est.incidence.by --- R/est.incidence.by.R | 9 +++++++-- man/est.incidence.by.Rd | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index 630aec53..8c9287b8 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -101,7 +101,12 @@ est.incidence.by <- function( return(to_return) } - if (!all(is.element(strata, pop_data %>% names()))) { + if (!( + is.element( + strata, + pop_data %>% names() + ) + )) { # search strata variable from pop_data strata_var <- grep( @@ -116,7 +121,7 @@ est.incidence.by <- function( message = c( "Can't find the column {.var {strata}} in {.envvar pop_data}.", if (length(strata_var) > 0) { - "i" = "Did you mean {.var {strata_var}}." + "i" <- "Did you mean {.var {strata_var}}." } ) ) diff --git a/man/est.incidence.by.Rd b/man/est.incidence.by.Rd index 123a4b16..a3a9cee1 100644 --- a/man/est.incidence.by.Rd +++ b/man/est.incidence.by.Rd @@ -128,7 +128,7 @@ est2 <- est.incidence.by( curve_params = curve, noise_params = noise \%>\% filter(Country == "Pakistan"), antigen_isos = c("HlyE_IgG", "HlyE_IgA"), - #num_cores = 8 # Allow for parallel processing to decrease run time + # num_cores = 8 # Allow for parallel processing to decrease run time iterlim = 5 # limit iterations for the purpose of this example ) From b82e3b5248dff7c69f544bbe28fc1b0f488a64cd Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Sun, 4 Aug 2024 22:37:17 +0300 Subject: [PATCH 03/61] add any() to is.element() --- R/est.incidence.by.R | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index 8c9287b8..35fe45bf 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -101,12 +101,7 @@ est.incidence.by <- function( return(to_return) } - if (!( - is.element( - strata, - pop_data %>% names() - ) - )) { + if (!any(is.element(strata,pop_data %>% names()))) { # search strata variable from pop_data strata_var <- grep( From 3c271ee89e259647e5934f4c8fee766fca066bda Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Wed, 7 Aug 2024 14:52:26 +0000 Subject: [PATCH 04/61] add test --- R/est.incidence.by.R | 4 ++-- tests/testthat/test-est.incidence.R | 33 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index 35fe45bf..d278f180 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -101,7 +101,7 @@ est.incidence.by <- function( return(to_return) } - if (!any(is.element(strata,pop_data %>% names()))) { + if (!any(is.element(strata, pop_data %>% names()))) { # search strata variable from pop_data strata_var <- grep( @@ -114,7 +114,7 @@ est.incidence.by <- function( cli::cli_abort( class = "missing_var", message = c( - "Can't find the column {.var {strata}} in {.envvar pop_data}.", + "Can't find the column {.arg {strata}} in {.arg pop_data}.", if (length(strata_var) > 0) { "i" <- "Did you mean {.var {strata_var}}." } diff --git a/tests/testthat/test-est.incidence.R b/tests/testthat/test-est.incidence.R index 59f479e8..5d32ad31 100644 --- a/tests/testthat/test-est.incidence.R +++ b/tests/testthat/test-est.incidence.R @@ -79,3 +79,36 @@ test_that("`est.incidence()` produces expected results", { expect_equal(est_true, est_false) }) + +test_that("est.incidence() aborts when strata is missing in `pop_data`", { + # get pop data + xs_data <- load_pop_data( + file_path = "https://osf.io/download//n6cp3/", + age = "Age", + value = "result", + id = "index_id", + standardize = TRUE + ) %>% + filter(Country == "Pakistan") %>% + slice_head(n = 100) + + # get noise data + noise <- load_noise_params("https://osf.io/download//hqy4v/") %>% + filter(Country == "Pakistan") + + # get curve data + curve <- load_curve_params("https://osf.io/download/rtw5k/") + + expect_error( + object = est.incidence.by( + strata = c("catch"), + pop_data = xs_data %>% filter(Country == "Pakistan"), + curve_params = curve, + noise_params = noise %>% filter(Country == "Pakistan"), + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + # num_cores = 8 # Allow for parallel processing to decrease run time + iterlim = 5 # limit iterations for the purpose of this example + ), + class = "missing_var" + ) +}) From 0cb88d6d661ab4df524c8d4258e507a3fe3d0880 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Wed, 14 Aug 2024 20:52:19 +0000 Subject: [PATCH 05/61] modify error messaging --- R/est.incidence.by.R | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index d278f180..be8a57ee 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -101,22 +101,31 @@ est.incidence.by <- function( return(to_return) } - if (!any(is.element(strata, pop_data %>% names()))) { + if (!all(is.element(strata, pop_data %>% names()))) { + # accommodate multiple strata + combined_pattern <- paste(strata, collapse = "|") + # search strata variable from pop_data - strata_var <- + present_vars <- grep( x = pop_data %>% names(), value = TRUE, - pattern = strata, + pattern = combined_pattern, ignore.case = TRUE ) + not_present_vars <- setdiff( + x = strata, + y = present_vars + ) + cli::cli_abort( class = "missing_var", message = c( - "Can't find the column {.arg {strata}} in {.arg pop_data}.", - if (length(strata_var) > 0) { - "i" <- "Did you mean {.var {strata_var}}." + "x" = "Can't stratify with the provided strata.", + "i" = "The {.arg strata} option{?s} {.arg {not_present_vars}} {?is/are} missing in {.arg pop_data}.", + if (length(present_vars) > 0) { + "i" <- "Did you mean {.var {present_vars}}?" } ) ) From b3523c7b98a26193ba19dfedeb0e2d28fdbf1f80 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Wed, 21 Aug 2024 11:08:56 +0300 Subject: [PATCH 06/61] make changes to tests and est.incidence.by --- R/est.incidence.by.R | 49 ++++++++++++++++------- tests/testthat/test-est.incidence.R | 33 ---------------- tests/testthat/test-est.incidence.by.R | 54 ++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 46 deletions(-) create mode 100644 tests/testthat/test-est.incidence.by.R diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index be8a57ee..933d553f 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -102,31 +102,54 @@ est.incidence.by <- function( } if (!all(is.element(strata, pop_data %>% names()))) { - # accommodate multiple strata - combined_pattern <- paste(strata, collapse = "|") - # search strata variable from pop_data - present_vars <- + # find strata with full match + present_vars <- purrr::map(.x = strata, .f = function(pattern) { grep( x = pop_data %>% names(), value = TRUE, - pattern = combined_pattern, + pattern = paste0("^", pattern, "$"), ignore.case = TRUE ) + }) %>% + purrr::keep(~ length(.x) > 0) %>% + unlist() - not_present_vars <- setdiff( - x = strata, - y = present_vars - ) + # find strata with partial matches + present_partial_vars <- purrr::keep(strata, + function(pattern) { + length( + grep( + pattern, + pop_data %>% names(), + ignore.case = TRUE)) > 0 + }) %>% + setdiff(y = present_vars) + + # get partial matches + partial_match <- purrr::map(.x = present_partial_vars, .f = function(pattern) { + grep( + x = pop_data %>% names(), + value = TRUE, + pattern = pattern, + ignore.case = TRUE + ) + }) %>% + purrr::keep(~ length(.x) > 0) %>% + unlist() + + # strata with no match + no_match_vars <- strata %>% + setdiff(pop_data %>% names()) %>% + setdiff(present_partial_vars) cli::cli_abort( class = "missing_var", message = c( "x" = "Can't stratify with the provided strata.", - "i" = "The {.arg strata} option{?s} {.arg {not_present_vars}} {?is/are} missing in {.arg pop_data}.", - if (length(present_vars) > 0) { - "i" <- "Did you mean {.var {present_vars}}?" - } + "i" = "The {.var {no_match_vars}} option for `strata` are missing in {.arg pop_data}.", + "i" = "The {.var {present_partial_vars}} option for `strata` are likely misspelled.", + "i" = "Did you mean {.var {partial_match}}?" ) ) } diff --git a/tests/testthat/test-est.incidence.R b/tests/testthat/test-est.incidence.R index 5d32ad31..59f479e8 100644 --- a/tests/testthat/test-est.incidence.R +++ b/tests/testthat/test-est.incidence.R @@ -79,36 +79,3 @@ test_that("`est.incidence()` produces expected results", { expect_equal(est_true, est_false) }) - -test_that("est.incidence() aborts when strata is missing in `pop_data`", { - # get pop data - xs_data <- load_pop_data( - file_path = "https://osf.io/download//n6cp3/", - age = "Age", - value = "result", - id = "index_id", - standardize = TRUE - ) %>% - filter(Country == "Pakistan") %>% - slice_head(n = 100) - - # get noise data - noise <- load_noise_params("https://osf.io/download//hqy4v/") %>% - filter(Country == "Pakistan") - - # get curve data - curve <- load_curve_params("https://osf.io/download/rtw5k/") - - expect_error( - object = est.incidence.by( - strata = c("catch"), - pop_data = xs_data %>% filter(Country == "Pakistan"), - curve_params = curve, - noise_params = noise %>% filter(Country == "Pakistan"), - antigen_isos = c("HlyE_IgG", "HlyE_IgA"), - # num_cores = 8 # Allow for parallel processing to decrease run time - iterlim = 5 # limit iterations for the purpose of this example - ), - class = "missing_var" - ) -}) diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R new file mode 100644 index 00000000..674c3c11 --- /dev/null +++ b/tests/testthat/test-est.incidence.by.R @@ -0,0 +1,54 @@ + +library(dplyr) + +# get pop data +xs_data <- load_pop_data( + file_path = "https://osf.io/download//n6cp3/", + age = "Age", + value = "result", + id = "index_id", + standardize = TRUE +) %>% + filter(Country == "Pakistan") %>% + slice_head(n = 100) + +# get noise data +noise <- load_noise_params("https://osf.io/download//hqy4v/") %>% + filter(Country == "Pakistan") + +# get curve data +curve <- load_curve_params("https://osf.io/download/rtw5k/") + +test_that("est.incidence.by() aborts when strata is missing in `pop_data`", { + + expect_error( + object = est.incidence.by( + strata = c("catch"), + pop_data = xs_data %>% filter(Country == "Pakistan"), + curve_params = curve, + noise_params = noise %>% filter(Country == "Pakistan"), + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + # num_cores = 8 # Allow for parallel processing to decrease run time + iterlim = 5 # limit iterations for the purpose of this example + ), + class = "missing_var" + ) +}) + +test_that("est.incidence.by() aborts when multiple elements that don't exactly match the columns of `pop_data` are provided", { + + expect_error( + object = est.incidence.by( + strata = c("catch","Count"), + pop_data = xs_data %>% filter(Country == "Pakistan"), + curve_params = curve, + noise_params = noise %>% filter(Country == "Pakistan"), + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + # num_cores = 8 # Allow for parallel processing to decrease run time + iterlim = 5 # limit iterations for the purpose of this example + ), + class = "missing_var" + ) + +}) + From c09df9b8a0e501ce2c4a67413c2bde85ae34a9d6 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Fri, 23 Aug 2024 00:29:02 +0300 Subject: [PATCH 07/61] add purrr to DESCRIPTION --- DESCRIPTION | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index e7072383..02af1296 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -31,7 +31,8 @@ Imports: tidyr, utils, tidyselect, - cli + cli, + purrr Suggests: parallel, knitr, From 42c7af654181f364c629d7473eaa3be191a37e07 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Mon, 26 Aug 2024 08:01:26 +0300 Subject: [PATCH 08/61] modify error message --- R/est.incidence.by.R | 8 +++--- {tests/testthat => R}/test-as_curve_params.R | 28 ++++++++++++++------ 2 files changed, 25 insertions(+), 11 deletions(-) rename {tests/testthat => R}/test-as_curve_params.R (53%) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index 933d553f..4b6011e2 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -147,9 +147,11 @@ est.incidence.by <- function( class = "missing_var", message = c( "x" = "Can't stratify with the provided strata.", - "i" = "The {.var {no_match_vars}} option for `strata` are missing in {.arg pop_data}.", - "i" = "The {.var {present_partial_vars}} option for `strata` are likely misspelled.", - "i" = "Did you mean {.var {partial_match}}?" + "i" = "The {.var {no_match_vars}} option{?s} for `strata` {?is/are} missing in {.arg pop_data}.", + if(length(present_partial_vars) > 0){ + c( "i" = "The {.var {present_partial_vars}} option for `strata` {?is/are} likely misspelled.", + "i" = "Did you mean {.var {partial_match}}?") + } ) ) } diff --git a/tests/testthat/test-as_curve_params.R b/R/test-as_curve_params.R similarity index 53% rename from tests/testthat/test-as_curve_params.R rename to R/test-as_curve_params.R index c89f457d..b982438f 100644 --- a/tests/testthat/test-as_curve_params.R +++ b/R/test-as_curve_params.R @@ -1,3 +1,4 @@ +library(testthat) test_that("`as_curve_params()` produces an error when non-curve data is provided", { library(magrittr) expect_error( @@ -9,13 +10,14 @@ test_that("`as_curve_params()` produces an error when non-curve data is provided ) }) -test_that("`as_curve_params()` produces an error when `data` is not a data.frame", - { - library(magrittr) - expect_error(object = - "https://osf.io/download//n6cp3/" %>% # pop data - as_curve_params(), class = "not data.frame") - }) +test_that("`as_curve_params()` produces an error when `data` is not a data.frame", { + library(magrittr) + expect_error( + object = + "https://osf.io/download//n6cp3/" %>% # pop data + as_curve_params(), class = "not data.frame" + ) +}) test_that("`as_curve_params()` produces expected results", { library(dplyr) @@ -26,7 +28,17 @@ test_that("`as_curve_params()` produces expected results", { expect_snapshot(test_data) - expect_snapshot_value(x = test_data, style = "serialize") + expect_snapshot_value( + x = test_data, + style = "serialize" + ) +}) +test_that("`as_curve_params()` produces error when wrong antigen_iso is provided", { + library(dplyr) + + expect_error(object = "https://osf.io/download/rtw5k/" %>% # noise data + readr::read_rds() %>% + as_curve_params(antigen_iso = "HlyE_IgB")) }) From 0f36e94361eddde5a0dcd90c49fed50255f44b04 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Mon, 26 Aug 2024 11:28:40 +0300 Subject: [PATCH 09/61] correct errors --- DESCRIPTION | 3 +- R/test-as_curve_params.R | 44 -------- tests/testthat/_snaps/as_curve_params.md | 124 ----------------------- 3 files changed, 2 insertions(+), 169 deletions(-) delete mode 100644 R/test-as_curve_params.R delete mode 100644 tests/testthat/_snaps/as_curve_params.md diff --git a/DESCRIPTION b/DESCRIPTION index 02af1296..29f91357 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -32,7 +32,8 @@ Imports: utils, tidyselect, cli, - purrr + purrr, + testthat Suggests: parallel, knitr, diff --git a/R/test-as_curve_params.R b/R/test-as_curve_params.R deleted file mode 100644 index b982438f..00000000 --- a/R/test-as_curve_params.R +++ /dev/null @@ -1,44 +0,0 @@ -library(testthat) -test_that("`as_curve_params()` produces an error when non-curve data is provided", { - library(magrittr) - expect_error( - object = curve_data <- - "https://osf.io/download//n6cp3/" %>% # pop data - readr::read_rds() %>% - as_curve_params(), - class = "not curve_params" - ) -}) - -test_that("`as_curve_params()` produces an error when `data` is not a data.frame", { - library(magrittr) - expect_error( - object = - "https://osf.io/download//n6cp3/" %>% # pop data - as_curve_params(), class = "not data.frame" - ) -}) - -test_that("`as_curve_params()` produces expected results", { - library(dplyr) - test_data <- "https://osf.io/download/rtw5k/" %>% # curve data - readr::read_rds() %>% - slice_head(n = 100) %>% - as_curve_params() - - expect_snapshot(test_data) - - expect_snapshot_value( - x = test_data, - style = "serialize" - ) -}) - - -test_that("`as_curve_params()` produces error when wrong antigen_iso is provided", { - library(dplyr) - - expect_error(object = "https://osf.io/download/rtw5k/" %>% # noise data - readr::read_rds() %>% - as_curve_params(antigen_iso = "HlyE_IgB")) -}) diff --git a/tests/testthat/_snaps/as_curve_params.md b/tests/testthat/_snaps/as_curve_params.md deleted file mode 100644 index 5d1b1bd5..00000000 --- a/tests/testthat/_snaps/as_curve_params.md +++ /dev/null @@ -1,124 +0,0 @@ -# `as_curve_params()` produces expected results - - Code - test_data - Output - # A tibble: 100 x 7 - antigen_iso iter y0 y1 t1 alpha r - - 1 HlyE_IgA 1 2.48 63.5 9.52 0.000581 1.75 - 2 HlyE_IgG 1 3.04 164. 6.55 0.00457 1.17 - 3 LPS_IgA 1 0.748 103. 4.98 0.00308 1.58 - 4 LPS_IgG 1 0.941 320. 6.14 0.00166 1.41 - 5 Vi_IgG 1 8.46 4348. 3.07 0.0000340 1.06 - 6 HlyE_IgA 2 3.86 288. 1.27 0.000459 2.66 - 7 HlyE_IgG 2 1.82 154. 10.8 0.000921 1.30 - 8 LPS_IgA 2 1.76 852. 2.49 0.000126 2.91 - 9 LPS_IgG 2 0.434 20.6 4.29 0.00122 1.37 - 10 Vi_IgG 2 18.8 345. 3.48 0.000142 1.02 - # i 90 more rows - ---- - - WAoAAAACAAQEAQACAwAAAAMTAAAABwAAAw0AAABkAAAAAQAAAAIAAAADAAAABAAAAAUAAAAB - AAAAAgAAAAMAAAAEAAAABQAAAAEAAAACAAAAAwAAAAQAAAAFAAAAAQAAAAIAAAADAAAABAAA - AAUAAAABAAAAAgAAAAMAAAAEAAAABQAAAAEAAAACAAAAAwAAAAQAAAAFAAAAAQAAAAIAAAAD - AAAABAAAAAUAAAABAAAAAgAAAAMAAAAEAAAABQAAAAEAAAACAAAAAwAAAAQAAAAFAAAAAQAA - AAIAAAADAAAABAAA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2A9xP/yabpid0npA - AkiF5Du5qT/373K2lK7oP/By7+5oG4xAC2bhEJpDoz/zdkYlYLLPQABjLSzXpMg/9kV4DGLW - bz//mn9BoV6WAAAEAgAAAv8AAAAQAAAABAAEAAkAAAAMY3VydmVfcGFyYW1zAAQACQAAAAZ0 - YmxfZGYABAAJAAAAA3RibAAEAAkAAAAKZGF0YS5mcmFtZQAABAIAAAABAAQACQAAAAlyb3cu - bmFtZXMAAAANAAAAAoAAAAD///+cAAAEAgAAAAEABAAJAAAABW5hbWVzAAAAEAAAAAcABAAJ - AAAAC2FudGlnZW5faXNvAAQACQAAAARpdGVyAAQACQAAAAJ5MAAEAAkAAAACeTEABAAJAAAA - AnQxAAQACQAAAAVhbHBoYQAEAAkAAAABcgAABAIAAAABAAQACQAAAAxhbnRpZ2VuX2lzb3MA - AAMNAAAABQAAAAEAAAACAAAAAwAAAAQAAAAFAAAEAgAAAf8AAAAQAAAABQAEAAkAAAAISGx5 - RV9JZ0EABAAJAAAACEhseUVfSWdHAAQACQAAAAdMUFNfSWdBAAQACQAAAAdMUFNfSWdHAAQA - CQAAAAZWaV9JZ0cAAAQCAAAC/wAAABAAAAABAAQACQAAAAZmYWN0b3IAAAD+AAAA/g== - From f97218aa360193710d0a11f8bc8093f513f4fe6d Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Mon, 26 Aug 2024 11:57:29 +0300 Subject: [PATCH 10/61] remove testthat from DESCRIPTION --- DESCRIPTION | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 29f91357..02af1296 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -32,8 +32,7 @@ Imports: utils, tidyselect, cli, - purrr, - testthat + purrr Suggests: parallel, knitr, From 13be6406b1fadf3765e7131ff9e2095107d66f1b Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 27 Aug 2024 13:24:49 -0700 Subject: [PATCH 11/61] in progress --- R/est.incidence.by.R | 64 ++++++++++---------------- tests/testthat/test-est.incidence.by.R | 2 +- 2 files changed, 25 insertions(+), 41 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index 4b6011e2..8ceb7a44 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -101,54 +101,38 @@ est.incidence.by <- function( return(to_return) } - if (!all(is.element(strata, pop_data %>% names()))) { + present_strata_vars = intersect(strata, names(pop_data)) + missing_strata_vars = setdiff(strata, present_strata_vars) - # find strata with full match - present_vars <- purrr::map(.x = strata, .f = function(pattern) { - grep( - x = pop_data %>% names(), - value = TRUE, - pattern = paste0("^", pattern, "$"), - ignore.case = TRUE - ) - }) %>% - purrr::keep(~ length(.x) > 0) %>% - unlist() - - # find strata with partial matches - present_partial_vars <- purrr::keep(strata, - function(pattern) { - length( - grep( - pattern, - pop_data %>% names(), - ignore.case = TRUE)) > 0 - }) %>% - setdiff(y = present_vars) + if (length(missing_strata_vars) > 0) { - # get partial matches - partial_match <- purrr::map(.x = present_partial_vars, .f = function(pattern) { - grep( - x = pop_data %>% names(), - value = TRUE, - pattern = pattern, - ignore.case = TRUE - ) - }) %>% - purrr::keep(~ length(.x) > 0) %>% - unlist() + partial_matches = + purrr::map( + missing_strata_vars, + function(x) + stringr::str_subset( + string = names(pop_data), + pattern = x + ) + ) %>% + setNames(missing_strata_vars) %>% + purrr::keep(~ length(.x) > 0)g # strata with no match - no_match_vars <- strata %>% - setdiff(pop_data %>% names()) %>% - setdiff(present_partial_vars) + no_match_vars <- missing_strata_vars %>% + setdiff(names(partial_matches)) + + possible_matches_strings = names(partial_matches) %>% sapply( + F = function(x) + glue::glue("{x}: {partial_matches[[x]] %>% and::or()}") + ) cli::cli_abort( class = "missing_var", message = c( - "x" = "Can't stratify with the provided strata.", - "i" = "The {.var {no_match_vars}} option{?s} for `strata` {?is/are} missing in {.arg pop_data}.", - if(length(present_partial_vars) > 0){ + "x" = "Can't stratify with the provided {.arg strata}.", + "i" = "{.var {missing_strata_vars}} {?is/are} missing in {.arg pop_data}.", + if(length(partial_matches) > 0){ c( "i" = "The {.var {present_partial_vars}} option for `strata` {?is/are} likely misspelled.", "i" = "Did you mean {.var {partial_match}}?") } diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index 674c3c11..4af10b33 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -39,7 +39,7 @@ test_that("est.incidence.by() aborts when multiple elements that don't exactly m expect_error( object = est.incidence.by( - strata = c("catch","Count"), + strata = c("ag", "catch","Count"), pop_data = xs_data %>% filter(Country == "Pakistan"), curve_params = curve, noise_params = noise %>% filter(Country == "Pakistan"), From 3bf79b39670d6e7b61a713e173936fd0787b0126 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Wed, 11 Sep 2024 00:22:07 +0300 Subject: [PATCH 12/61] lint file --- R/est.incidence.by.R | 124 ++++++++++++++----------------------------- 1 file changed, 40 insertions(+), 84 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index 4b6011e2..4b3f9c88 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -1,14 +1,22 @@ #' Estimate Seroincidence -#' #' @description -#' Function to estimate seroincidences based on cross-section serology data and longitudinal +#' Function to estimate seroincidences based on cross-section +#' serology data and longitudinal #' response model. #' -#' @param pop_data a [data.frame] with cross-sectional serology data per antibody and age, and additional columns corresponding to each element of the `strata` input -#' @param strata a [character] vector of stratum-defining variables. Values must be variable names in `pop_data`. -#' @param curve_strata_varnames A subset of `strata`. Values must be variable names in `curve_params`. Default = "". -#' @param noise_strata_varnames A subset of `strata`. Values must be variable names in `noise_params`. Default = "". -#' @param num_cores Number of processor cores to use for calculations when computing by strata. If set to more than 1 and package \pkg{parallel} is available, then the computations are executed in parallel. Default = 1L. +#' @param pop_data a [data.frame] with cross-sectional serology data per +#' antibody and age, and additional columns corresponding to +#' each element of the `strata` input +#' @param strata a [character] vector of stratum-defining variables. +#' Values must be variable names in `pop_data`. +#' @param curve_strata_varnames A subset of `strata`. +#' Values must be variable names in `curve_params`. Default = "". +#' @param noise_strata_varnames A subset of `strata`. +#' Values must be variable names in `noise_params`. Default = "". +#' @param num_cores Number of processor cores to use for +#' calculations when computing by strata. If set to +#' more than 1 and package \pkg{parallel} is available, +#' then the computations are executed in parallel. Default = 1L. #' @details #' @@ -17,7 +25,8 @@ #' and then the data will be passed to [est.incidence()]. #' If for some reason you want to use [est.incidence.by()] #' with no strata instead of calling [est.incidence()], -#' you may use `NA`, `NULL`, or `""` as the `strata` argument to avoid that warning. +#' you may use `NA`, `NULL`, or `""` as the `strata` +#' argument to avoid that warning. #' #' #' @inheritParams est.incidence @@ -26,7 +35,9 @@ #' #' @return #' * if `strata` has meaningful inputs: -#' An object of class `"seroincidence.by"`; i.e., a list of `"seroincidence"` objects from [est.incidence()], one for each stratum, with some meta-data attributes. +#' An object of class `"seroincidence.by"`; i.e., a list of ` +#' "seroincidence"` objects from [est.incidence()], one for each stratum, +#' with some meta-data attributes. #' * if `strata` is missing, `NULL`, `NA`, or `""`: #' An object of class `"seroincidence"`. #' @@ -39,7 +50,7 @@ #' #' curve <- load_curve_params("https://osf.io/download/rtw5k/") %>% #' filter(antigen_iso %in% c("HlyE_IgA", "HlyE_IgG")) %>% -#' slice(1:100, .by = antigen_iso) # Reduce dataset for the purposes of this example +#' slice(1:100, .by = antigen_iso) #' #' noise <- load_noise_params("https://osf.io/download//hqy4v/") #' @@ -75,16 +86,19 @@ est.incidence.by <- function( warning( "The `strata` argument to `est.incidence.by()` is missing.", "\n\n If you do not want to stratify your data, ", - "consider using the `est.incidence()` function to simplify your code and avoid this warning.", - "\n\n Since the `strata` argument is empty, `est.incidence.by()` will return a `seroincidence` object, instead of a `seroincidence.by` object.\n" + "consider using the `est.incidence()` function to + simplify your code and avoid this warning.", + "\n\n Since the `strata` argument is empty, `est.incidence.by()` + will return a `seroincidence` object, instead of a + `seroincidence.by` object.\n" ) } strata_is_empty <- missing(strata) || - is.null(strata) || - setequal(strata, NA) || - setequal(strata, "") + is.null(strata) || + setequal(strata, NA) || + setequal(strata, "") if (strata_is_empty) { to_return <- @@ -101,61 +115,6 @@ est.incidence.by <- function( return(to_return) } - if (!all(is.element(strata, pop_data %>% names()))) { - - # find strata with full match - present_vars <- purrr::map(.x = strata, .f = function(pattern) { - grep( - x = pop_data %>% names(), - value = TRUE, - pattern = paste0("^", pattern, "$"), - ignore.case = TRUE - ) - }) %>% - purrr::keep(~ length(.x) > 0) %>% - unlist() - - # find strata with partial matches - present_partial_vars <- purrr::keep(strata, - function(pattern) { - length( - grep( - pattern, - pop_data %>% names(), - ignore.case = TRUE)) > 0 - }) %>% - setdiff(y = present_vars) - - # get partial matches - partial_match <- purrr::map(.x = present_partial_vars, .f = function(pattern) { - grep( - x = pop_data %>% names(), - value = TRUE, - pattern = pattern, - ignore.case = TRUE - ) - }) %>% - purrr::keep(~ length(.x) > 0) %>% - unlist() - - # strata with no match - no_match_vars <- strata %>% - setdiff(pop_data %>% names()) %>% - setdiff(present_partial_vars) - - cli::cli_abort( - class = "missing_var", - message = c( - "x" = "Can't stratify with the provided strata.", - "i" = "The {.var {no_match_vars}} option{?s} for `strata` {?is/are} missing in {.arg pop_data}.", - if(length(present_partial_vars) > 0){ - c( "i" = "The {.var {present_partial_vars}} option for `strata` {?is/are} likely misspelled.", - "i" = "Did you mean {.var {partial_match}}?") - } - ) - ) - } - .checkStrata(data = pop_data, strata = strata) .errorCheck( @@ -185,8 +144,10 @@ est.incidence.by <- function( if (num_cores > 1L && !requireNamespace("parallel", quietly = TRUE)) { warning( - "The `parallel` package is not installed, so `num_cores > 1` has no effect.", - "To install `parallel`, run `install.packages('parallel')` in the console." + "The `parallel` package is not installed, + so `num_cores > 1` has no effect.", + "To install `parallel`, run `install.packages('parallel')` + in the console." ) } @@ -197,7 +158,8 @@ est.incidence.by <- function( num_cores <- num_cores %>% check_parallel_cores() if (verbose) { - message("Setting up parallel processing with `num_cores` = ", num_cores, ".") + message("Setting up parallel processing with + `num_cores` = ", num_cores, ".") } @@ -213,10 +175,10 @@ est.incidence.by <- function( parallel::clusterExport(cl, c("libPaths"), envir = environment()) parallel::clusterEvalQ(cl, { .libPaths(libPaths) - require(serocalculator) # note - this gets out of sync when using load_all() in development + require(serocalculator) # note - this gets out of sync" %>% + "when using load_all() in development" require(dplyr) }) - { fits <- parallel::parLapplyLB( cl = cl, @@ -245,16 +207,9 @@ est.incidence.by <- function( print(time) } } else { - # fits <- lapply( - # X = stratumDataList, - # FUN = function(x) est.incidence(dataList = x, verbose = verbose, ...)) - fits <- list() - { # time progress - - for (cur_stratum in names(stratumDataList)) - { + for (cur_stratum in names(stratumDataList)) { cur_stratum_vars <- strata_table %>% dplyr::filter(.data$Stratum == cur_stratum) @@ -280,7 +235,8 @@ est.incidence.by <- function( ) ) } - } %>% system.time() -> time + } + if (verbose) { message("Elapsed time for loop over strata: ") From 927911a87497f23b9e74ed424ac5af1d8c22ad08 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Wed, 11 Sep 2024 09:30:24 +0300 Subject: [PATCH 13/61] lint tests --- man/est.incidence.by.Rd | 29 +++-- man/stratify_data.Rd | 6 +- tests/testthat/_snaps/est.incidence.by.md | 11 ++ tests/testthat/test-est.incidence.by.R | 123 +++++++++++++--------- 4 files changed, 110 insertions(+), 59 deletions(-) create mode 100644 tests/testthat/_snaps/est.incidence.by.md diff --git a/man/est.incidence.by.Rd b/man/est.incidence.by.Rd index a3a9cee1..fc6d7135 100644 --- a/man/est.incidence.by.Rd +++ b/man/est.incidence.by.Rd @@ -21,7 +21,9 @@ est.incidence.by( ) } \arguments{ -\item{pop_data}{a \link{data.frame} with cross-sectional serology data per antibody and age, and additional columns corresponding to each element of the \code{strata} input} +\item{pop_data}{a \link{data.frame} with cross-sectional serology data per +antibody and age, and additional columns corresponding to +each element of the \code{strata} input} \item{curve_params}{a \code{\link[=data.frame]{data.frame()}} containing MCMC samples of parameters from the Bayesian posterior distribution of a longitudinal decay curve model. The parameter columns must be named: \itemize{ @@ -43,11 +45,14 @@ est.incidence.by( \item \code{y.high}: upper limit of detection for the current antigen isotype }} -\item{strata}{a \link{character} vector of stratum-defining variables. Values must be variable names in \code{pop_data}.} +\item{strata}{a \link{character} vector of stratum-defining variables. +Values must be variable names in \code{pop_data}.} -\item{curve_strata_varnames}{A subset of \code{strata}. Values must be variable names in \code{curve_params}. Default = "".} +\item{curve_strata_varnames}{A subset of \code{strata}. +Values must be variable names in \code{curve_params}. Default = "".} -\item{noise_strata_varnames}{A subset of \code{strata}. Values must be variable names in \code{noise_params}. Default = "".} +\item{noise_strata_varnames}{A subset of \code{strata}. +Values must be variable names in \code{noise_params}. Default = "".} \item{antigen_isos}{Character vector with one or more antibody names. Values must match \code{pop_data}} @@ -55,7 +60,10 @@ est.incidence.by( \item{build_graph}{whether to graph the log-likelihood function across a range of incidence rates (lambda values)} -\item{num_cores}{Number of processor cores to use for calculations when computing by strata. If set to more than 1 and package \pkg{parallel} is available, then the computations are executed in parallel. Default = 1L.} +\item{num_cores}{Number of processor cores to use for +calculations when computing by strata. If set to +more than 1 and package \pkg{parallel} is available, +then the computations are executed in parallel. Default = 1L.} \item{verbose}{logical: if TRUE, print verbose log information to console} @@ -93,13 +101,15 @@ est.incidence.by( \value{ \itemize{ \item if \code{strata} has meaningful inputs: -An object of class \code{"seroincidence.by"}; i.e., a list of \code{"seroincidence"} objects from \code{\link[=est.incidence]{est.incidence()}}, one for each stratum, with some meta-data attributes. +An object of class \code{"seroincidence.by"}; i.e., a list of \code{ "seroincidence"} objects from \code{\link[=est.incidence]{est.incidence()}}, one for each stratum, +with some meta-data attributes. \item if \code{strata} is missing, \code{NULL}, \code{NA}, or \code{""}: An object of class \code{"seroincidence"}. } } \description{ -Function to estimate seroincidences based on cross-section serology data and longitudinal +Function to estimate seroincidences based on cross-section +serology data and longitudinal response model. } \details{ @@ -108,7 +118,8 @@ recommending that you use \code{\link[=est.incidence]{est.incidence()}} for unst and then the data will be passed to \code{\link[=est.incidence]{est.incidence()}}. If for some reason you want to use \code{\link[=est.incidence.by]{est.incidence.by()}} with no strata instead of calling \code{\link[=est.incidence]{est.incidence()}}, -you may use \code{NA}, \code{NULL}, or \code{""} as the \code{strata} argument to avoid that warning. +you may use \code{NA}, \code{NULL}, or \code{""} as the \code{strata} +argument to avoid that warning. } \examples{ @@ -118,7 +129,7 @@ xs_data <- load_pop_data("https://osf.io/download//n6cp3/") curve <- load_curve_params("https://osf.io/download/rtw5k/") \%>\% filter(antigen_iso \%in\% c("HlyE_IgA", "HlyE_IgG")) \%>\% - slice(1:100, .by = antigen_iso) # Reduce dataset for the purposes of this example + slice(1:100, .by = antigen_iso) noise <- load_noise_params("https://osf.io/download//hqy4v/") diff --git a/man/stratify_data.Rd b/man/stratify_data.Rd index 7dacbcbb..85589931 100644 --- a/man/stratify_data.Rd +++ b/man/stratify_data.Rd @@ -37,9 +37,11 @@ stratify_data( \item{strata_varnames}{\code{\link[=character]{character()}} vector of names of variables in \code{data} to stratify by} -\item{curve_strata_varnames}{A subset of \code{strata}. Values must be variable names in \code{curve_params}. Default = "".} +\item{curve_strata_varnames}{A subset of \code{strata}. +Values must be variable names in \code{curve_params}. Default = "".} -\item{noise_strata_varnames}{A subset of \code{strata}. Values must be variable names in \code{noise_params}. Default = "".} +\item{noise_strata_varnames}{A subset of \code{strata}. +Values must be variable names in \code{noise_params}. Default = "".} \item{antigen_isos}{Character vector with one or more antibody names. Values must match \code{pop_data}} } diff --git a/tests/testthat/_snaps/est.incidence.by.md b/tests/testthat/_snaps/est.incidence.by.md new file mode 100644 index 00000000..ec5db903 --- /dev/null +++ b/tests/testthat/_snaps/est.incidence.by.md @@ -0,0 +1,11 @@ +# est.incidence() produces expected results for typhoid data + + Code + typhoid_results + Output + # A tibble: 1 x 10 + est.start incidence.rate SE CI.lwr CI.upr coverage log.lik iterations + + 1 0.1 0.133 0.0216 0.0962 0.182 0.95 -261. 4 + # i 2 more variables: antigen.isos , nlm.convergence.code + diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index 674c3c11..59f479e8 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -1,54 +1,81 @@ +test_that( + "est.incidence() produces expected results for typhoid data", + { + library(dplyr) + # get pop data + xs_data <- load_pop_data( + file_path = "https://osf.io/download//n6cp3/", + age = "Age", + value = "result", + id = "index_id", + standardize = TRUE + ) %>% + filter(Country == "Pakistan") %>% + slice_head(n = 100) -library(dplyr) - -# get pop data -xs_data <- load_pop_data( - file_path = "https://osf.io/download//n6cp3/", - age = "Age", - value = "result", - id = "index_id", - standardize = TRUE -) %>% - filter(Country == "Pakistan") %>% - slice_head(n = 100) - -# get noise data -noise <- load_noise_params("https://osf.io/download//hqy4v/") %>% - filter(Country == "Pakistan") - -# get curve data -curve <- load_curve_params("https://osf.io/download/rtw5k/") - -test_that("est.incidence.by() aborts when strata is missing in `pop_data`", { - - expect_error( - object = est.incidence.by( - strata = c("catch"), - pop_data = xs_data %>% filter(Country == "Pakistan"), - curve_params = curve, - noise_params = noise %>% filter(Country == "Pakistan"), - antigen_isos = c("HlyE_IgG", "HlyE_IgA"), - # num_cores = 8 # Allow for parallel processing to decrease run time - iterlim = 5 # limit iterations for the purpose of this example - ), - class = "missing_var" + # get noise data + noise <- load_noise_params("https://osf.io/download//hqy4v/") %>% + filter(Country == "Pakistan") + + # get curve data + curve <- load_curve_params("https://osf.io/download/rtw5k/") # slice if test is too slow (.by = antigen_iso)) + + # set start + start <- .05 + + typhoid_results <- est.incidence( + pop_data = xs_data, + curve_param = curve, + noise_param = noise, + antigen_isos = c("HlyE_IgG", "HlyE_IgA") + ) %>% + summary.seroincidence( + coverage = .95, + start = start + ) + + expect_snapshot(x = typhoid_results) + } +) + +test_that("`est.incidence()` produces expected results", { + curves <- load_curve_params("https://osf.io/download/rtw5k/") + noise <- load_noise_params("https://osf.io/download//hqy4v/") + xs_data_true <- load_pop_data( + file_path = "https://osf.io/download//n6cp3/", + age = "Age", + value = "result", + id = "index_id", + standardize = TRUE + ) %>% + filter(Country == "Pakistan") %>% + slice_head(n = 100) + + + est_true <- est.incidence( + pop_data = xs_data_true, + curve_params = curves, + noise_params = noise %>% filter(Country == "Pakistan"), + antigen_isos = c("HlyE_IgG", "HlyE_IgA") ) -}) -test_that("est.incidence.by() aborts when multiple elements that don't exactly match the columns of `pop_data` are provided", { - - expect_error( - object = est.incidence.by( - strata = c("catch","Count"), - pop_data = xs_data %>% filter(Country == "Pakistan"), - curve_params = curve, - noise_params = noise %>% filter(Country == "Pakistan"), - antigen_isos = c("HlyE_IgG", "HlyE_IgA"), - # num_cores = 8 # Allow for parallel processing to decrease run time - iterlim = 5 # limit iterations for the purpose of this example - ), - class = "missing_var" + xs_data_false <- load_pop_data( + file_path = "https://osf.io/download//n6cp3/", + age = "Age", + value = "result", + id = "index_id", + standardize = FALSE + ) %>% + filter(Country == "Pakistan") %>% + slice_head(n = 100) + + + est_false <- est.incidence( + pop_data = xs_data_false, + curve_params = curves, + noise_params = noise %>% filter(Country == "Pakistan"), + antigen_isos = c("HlyE_IgG", "HlyE_IgA") ) + expect_equal(est_true, est_false) }) - From 8302735c5a7fcb0a5a527ced9d6de86d3f94d71b Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Tue, 17 Sep 2024 17:55:47 +0300 Subject: [PATCH 14/61] increment version --- DESCRIPTION | 2 +- NEWS.md | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 53086384..ae1bc04d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: serocalculator Type: Package Title: Estimating Infection Rates from Serological Data -Version: 1.2.0.9001 +Version: 1.3.0 Authors@R: c( person(given = "Peter", family = "Teunis", email = "p.teunis@emory.edu", role = c("aut", "cph"), comment = "Author of the method and original code."), person(given = "Kristina", family = "Lai", email = "kwlai@ucdavis.edu", role = c("aut", "cre")), diff --git a/NEWS.md b/NEWS.md index 41549599..60cae3ee 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,7 @@ -# serocalculator (development version) +# serocalculator 1.3.0 +* Add test for `est.incidence` + +* Add option to test `strata` in `pop_data` # serocalculator 1.2.0 * Added `test-summary.pop_data` test From 47dd63a04a87abbdd117b207c389f245311d7c30 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 23 Sep 2024 10:59:13 -0700 Subject: [PATCH 15/61] line break --- tests/testthat/test-est.incidence.by.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index 4af10b33..a514ac30 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -35,7 +35,8 @@ test_that("est.incidence.by() aborts when strata is missing in `pop_data`", { ) }) -test_that("est.incidence.by() aborts when multiple elements that don't exactly match the columns of `pop_data` are provided", { +test_that("est.incidence.by() aborts when multiple elements that don't exactly + match the columns of `pop_data` are provided", { expect_error( object = est.incidence.by( From 6b365c05761f55835ac43a1c8750c9ff3c410392 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 23 Sep 2024 17:13:27 -0700 Subject: [PATCH 16/61] increment version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 84a3e69e..1a30553a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: serocalculator Type: Package Title: Estimating Infection Rates from Serological Data -Version: 1.2.0.9002 +Version: 1.2.0.9003 Authors@R: c( person(given = "Peter", family = "Teunis", email = "p.teunis@emory.edu", role = c("aut", "cph"), comment = "Author of the method and original code."), person(given = "Kristina", family = "Lai", email = "kwlai@ucdavis.edu", role = c("aut", "cre")), From c22ed3c71b8fe49ef8e7291e70f4dbbaaf4f0687 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Sun, 13 Oct 2024 23:29:33 +0300 Subject: [PATCH 17/61] requested changes --- NEWS.md | 6 +- R/est.incidence.by.R | 71 ++++++++++++----------- man/est.incidence.by.Rd | 3 +- tests/testthat/_snaps/est.incidence.by.md | 31 ++++++++-- tests/testthat/test-est.incidence.by.R | 58 ++++++++++++++---- 5 files changed, 113 insertions(+), 56 deletions(-) diff --git a/NEWS.md b/NEWS.md index dad9ffaf..ec60dec6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,9 +1,7 @@ # serocalculator 1.3.0 -* Add test for `est.incidence` -* Add option to test `strata` in `pop_data` - -## New features +## New features* +* Add test for missing strata in `est.incidence.by` (#227) * Add `as_noise_params` (#228) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index 4b3f9c88..6e2815e6 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -1,6 +1,6 @@ #' Estimate Seroincidence #' @description -#' Function to estimate seroincidences based on cross-section +#' Function to estimate seroincidences based on cross-sectional #' serology data and longitudinal #' response model. #' @@ -50,6 +50,7 @@ #' #' curve <- load_curve_params("https://osf.io/download/rtw5k/") %>% #' filter(antigen_iso %in% c("HlyE_IgA", "HlyE_IgG")) %>% +#' # Reduce dataset for the purposes of this example #' slice(1:100, .by = antigen_iso) #' #' noise <- load_noise_params("https://osf.io/download//hqy4v/") @@ -137,13 +138,13 @@ est.incidence.by <- function( strata_table <- stratumDataList %>% attr("strata") if (verbose) { - message("Data has been stratified.") - message("Here are the strata that will be analyzed:") + cli::cli_inform("Data has been stratified.") + cli::cli_inform("Here are the strata that will be analyzed:") print(strata_table) } if (num_cores > 1L && !requireNamespace("parallel", quietly = TRUE)) { - warning( + cli::cli_warn( "The `parallel` package is not installed, so `num_cores > 1` has no effect.", "To install `parallel`, run `install.packages('parallel')` @@ -162,7 +163,6 @@ est.incidence.by <- function( `num_cores` = ", num_cores, ".") } - libPaths <- .libPaths() cl <- num_cores %>% @@ -172,14 +172,19 @@ est.incidence.by <- function( parallel::stopCluster(cl) }) + # Export library paths to the cluster parallel::clusterExport(cl, c("libPaths"), envir = environment()) + + # Evaluate library loading on the cluster parallel::clusterEvalQ(cl, { .libPaths(libPaths) - require(serocalculator) # note - this gets out of sync" %>% - "when using load_all() in development" + # note - this gets out of sync when using load_all() in development + require(serocalculator) require(dplyr) }) - { + + # Perform parallel computation and record execution time + time <- system.time({ fits <- parallel::parLapplyLB( cl = cl, X = stratumDataList, @@ -200,41 +205,39 @@ est.incidence.by <- function( ) } ) - } %>% system.time() -> time + }) if (verbose) { message("Elapsed time for parallelized code: ") print(time) } } else { - fits <- list() - { # time progress - for (cur_stratum in names(stratumDataList)) { - cur_stratum_vars <- - strata_table %>% - dplyr::filter(.data$Stratum == cur_stratum) + fits <- list() # Initialize an empty list for fits - if (verbose) { - message("starting new stratum: ", cur_stratum) - print(cur_stratum_vars) - } + # Time progress + for (cur_stratum in names(stratumDataList)) { + cur_stratum_vars <- strata_table %>% + dplyr::filter(.data$Stratum == cur_stratum) - fits[[cur_stratum]] <- - do.call( - what = est.incidence, - args = c( - stratumDataList[[cur_stratum]], - list( - lambda_start = lambda_start, - antigen_isos = antigen_isos, - build_graph = build_graph, - print_graph = print_graph, - verbose = verbose, - ... - ) - ) - ) + if (verbose) { + message("starting new stratum: ", cur_stratum) + print(cur_stratum_vars) } + + fits[[cur_stratum]] <- do.call( + what = est.incidence, + args = c( + stratumDataList[[cur_stratum]], + list( + lambda_start = lambda_start, + antigen_isos = antigen_isos, + build_graph = build_graph, + print_graph = print_graph, + verbose = verbose, + ... + ) + ) + ) } diff --git a/man/est.incidence.by.Rd b/man/est.incidence.by.Rd index 18ca38c3..a0653c19 100644 --- a/man/est.incidence.by.Rd +++ b/man/est.incidence.by.Rd @@ -115,7 +115,7 @@ An object of class \code{"seroincidence"}. } } \description{ -Function to estimate seroincidences based on cross-section +Function to estimate seroincidences based on cross-sectional serology data and longitudinal response model. } @@ -136,6 +136,7 @@ xs_data <- load_pop_data("https://osf.io/download//n6cp3/") curve <- load_curve_params("https://osf.io/download/rtw5k/") \%>\% filter(antigen_iso \%in\% c("HlyE_IgA", "HlyE_IgG")) \%>\% + # Reduce dataset for the purposes of this example slice(1:100, .by = antigen_iso) noise <- load_noise_params("https://osf.io/download//hqy4v/") diff --git a/tests/testthat/_snaps/est.incidence.by.md b/tests/testthat/_snaps/est.incidence.by.md index ec5db903..375c2981 100644 --- a/tests/testthat/_snaps/est.incidence.by.md +++ b/tests/testthat/_snaps/est.incidence.by.md @@ -1,11 +1,30 @@ -# est.incidence() produces expected results for typhoid data +# est.incidence.by() produces expected results for typhoid data Code typhoid_results Output - # A tibble: 1 x 10 - est.start incidence.rate SE CI.lwr CI.upr coverage log.lik iterations - - 1 0.1 0.133 0.0216 0.0962 0.182 0.95 -261. 4 - # i 2 more variables: antigen.isos , nlm.convergence.code + `seroincidence.by` object estimated given the following setup: + a) Antigen isotypes : HlyE_IgG, HlyE_IgA + b) Strata : catchment + + This object is a list of `seroincidence` objects, with added meta-data attributes:`antigen_isos` - Character vector of antigen isotypes used in analysis. + `Strata` - Input parameter strata of function `est.incidence.by()` + + Call the `summary()` function to obtain output results. + +--- + + structure(list("Stratum 1" = structure(list(minimum = 111.463434776159, + estimate = -2.41983536033088, gradient = -3.74675296382939e-06, + hessian = structure(15.251407603436, dim = c(1L, 1L)), code = 1L, + iterations = 4L), class = c("seroincidence", "list"), lambda_start = 0.1, antigen_isos = c("HlyE_IgG", + "HlyE_IgA")), "Stratum 2" = structure(list(minimum = 146.290052920951, + estimate = -1.640278556419, gradient = -8.66368377467952e-08, + hessian = structure(21.109488557163, dim = c(1L, 1L)), code = 1L, + iterations = 5L), class = c("seroincidence", "list"), lambda_start = 0.1, antigen_isos = c("HlyE_IgG", + "HlyE_IgA"))), antigen_isos = c("HlyE_IgG", "HlyE_IgA"), Strata = structure(list( + Stratum = c("Stratum 1", "Stratum 2"), catchment = c("aku", + "kgh"), n = c(25L, 25L)), row.names = c(NA, -2L), class = c("tbl_df", + "tbl", "data.frame"), strata_vars = "catchment"), graphs_included = FALSE, class = c("seroincidence.by", + "list")) diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index 59f479e8..b9cd210b 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -1,5 +1,5 @@ test_that( - "est.incidence() produces expected results for typhoid data", + "est.incidence.by() produces expected results for typhoid data", { library(dplyr) # get pop data @@ -23,22 +23,24 @@ test_that( # set start start <- .05 - typhoid_results <- est.incidence( + typhoid_results <- est.incidence.by( + strata = c("catchment"), pop_data = xs_data, curve_param = curve, + curve_strata_varnames = NULL, + noise_strata_varnames = "catchment", noise_param = noise, - antigen_isos = c("HlyE_IgG", "HlyE_IgA") - ) %>% - summary.seroincidence( - coverage = .95, - start = start - ) + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + num_cores = 8 # Allow for parallel processing to decrease run time + ) expect_snapshot(x = typhoid_results) + + expect_snapshot_value(typhoid_results, style = "deparse") } ) -test_that("`est.incidence()` produces expected results", { +test_that("`est.incidence.by()` produces expected results", { curves <- load_curve_params("https://osf.io/download/rtw5k/") noise <- load_noise_params("https://osf.io/download//hqy4v/") xs_data_true <- load_pop_data( @@ -52,7 +54,8 @@ test_that("`est.incidence()` produces expected results", { slice_head(n = 100) - est_true <- est.incidence( + est_true <- est.incidence.by( + strata = c("catchment"), pop_data = xs_data_true, curve_params = curves, noise_params = noise %>% filter(Country == "Pakistan"), @@ -70,7 +73,8 @@ test_that("`est.incidence()` produces expected results", { slice_head(n = 100) - est_false <- est.incidence( + est_false <- est.incidence.by( + strata = c("catchment"), pop_data = xs_data_false, curve_params = curves, noise_params = noise %>% filter(Country == "Pakistan"), @@ -79,3 +83,35 @@ test_that("`est.incidence()` produces expected results", { expect_equal(est_true, est_false) }) + +test_that("est.incidence.by() issues warning when strata is missing", { + + # get pop data + xs_data <- load_pop_data( + file_path = "https://osf.io/download//n6cp3/", + age = "Age", + value = "result", + id = "index_id", + standardize = TRUE + ) %>% + filter(Country == "Pakistan") %>% + slice_head(n = 100) + + # get noise data + noise <- load_noise_params("https://osf.io/download//hqy4v/") %>% + filter(Country == "Pakistan") + + # get curve data + curve <- load_curve_params("https://osf.io/download/rtw5k/") + + expect_warning( + est.incidence.by( + pop_data = xs_data, + curve_params = curve, + noise_params = noise, + antigen_isos = c("HlyE_IgG", "HlyE_IgA") + ), + regexp = "The `strata` argument to `est.incidence.by\\(\\)` is missing." + ) + +}) From 1eb1441b3879b5fc10a5ece9d7aedd537fe0af67 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Tue, 15 Oct 2024 19:38:22 +0300 Subject: [PATCH 18/61] push additional changes to tests --- tests/testthat/_snaps/est.incidence.by.md | 17 ++++------- tests/testthat/_snaps/est.incidence.by.new.md | 30 +++++++++++++++++++ tests/testthat/test-est.incidence.by.R | 8 +++-- 3 files changed, 41 insertions(+), 14 deletions(-) create mode 100644 tests/testthat/_snaps/est.incidence.by.new.md diff --git a/tests/testthat/_snaps/est.incidence.by.md b/tests/testthat/_snaps/est.incidence.by.md index 375c2981..e77fb829 100644 --- a/tests/testthat/_snaps/est.incidence.by.md +++ b/tests/testthat/_snaps/est.incidence.by.md @@ -5,7 +5,7 @@ Output `seroincidence.by` object estimated given the following setup: a) Antigen isotypes : HlyE_IgG, HlyE_IgA - b) Strata : catchment + b) Strata : Country This object is a list of `seroincidence` objects, with added meta-data attributes:`antigen_isos` - Character vector of antigen isotypes used in analysis. `Strata` - Input parameter strata of function `est.incidence.by()` @@ -14,17 +14,12 @@ --- - structure(list("Stratum 1" = structure(list(minimum = 111.463434776159, - estimate = -2.41983536033088, gradient = -3.74675296382939e-06, - hessian = structure(15.251407603436, dim = c(1L, 1L)), code = 1L, + structure(list("Stratum 1" = structure(list(minimum = 260.546868067556, + estimate = -2.02114708582914, gradient = 3.37492026736821e-07, + hessian = structure(37.570481481294, dim = c(1L, 1L)), code = 1L, iterations = 4L), class = c("seroincidence", "list"), lambda_start = 0.1, antigen_isos = c("HlyE_IgG", - "HlyE_IgA")), "Stratum 2" = structure(list(minimum = 146.290052920951, - estimate = -1.640278556419, gradient = -8.66368377467952e-08, - hessian = structure(21.109488557163, dim = c(1L, 1L)), code = 1L, - iterations = 5L), class = c("seroincidence", "list"), lambda_start = 0.1, antigen_isos = c("HlyE_IgG", "HlyE_IgA"))), antigen_isos = c("HlyE_IgG", "HlyE_IgA"), Strata = structure(list( - Stratum = c("Stratum 1", "Stratum 2"), catchment = c("aku", - "kgh"), n = c(25L, 25L)), row.names = c(NA, -2L), class = c("tbl_df", - "tbl", "data.frame"), strata_vars = "catchment"), graphs_included = FALSE, class = c("seroincidence.by", + Stratum = "Stratum 1", Country = "Pakistan", n = 50L), row.names = c(NA, + -1L), class = c("tbl_df", "tbl", "data.frame"), strata_vars = "Country"), graphs_included = FALSE, class = c("seroincidence.by", "list")) diff --git a/tests/testthat/_snaps/est.incidence.by.new.md b/tests/testthat/_snaps/est.incidence.by.new.md new file mode 100644 index 00000000..375c2981 --- /dev/null +++ b/tests/testthat/_snaps/est.incidence.by.new.md @@ -0,0 +1,30 @@ +# est.incidence.by() produces expected results for typhoid data + + Code + typhoid_results + Output + `seroincidence.by` object estimated given the following setup: + a) Antigen isotypes : HlyE_IgG, HlyE_IgA + b) Strata : catchment + + This object is a list of `seroincidence` objects, with added meta-data attributes:`antigen_isos` - Character vector of antigen isotypes used in analysis. + `Strata` - Input parameter strata of function `est.incidence.by()` + + Call the `summary()` function to obtain output results. + +--- + + structure(list("Stratum 1" = structure(list(minimum = 111.463434776159, + estimate = -2.41983536033088, gradient = -3.74675296382939e-06, + hessian = structure(15.251407603436, dim = c(1L, 1L)), code = 1L, + iterations = 4L), class = c("seroincidence", "list"), lambda_start = 0.1, antigen_isos = c("HlyE_IgG", + "HlyE_IgA")), "Stratum 2" = structure(list(minimum = 146.290052920951, + estimate = -1.640278556419, gradient = -8.66368377467952e-08, + hessian = structure(21.109488557163, dim = c(1L, 1L)), code = 1L, + iterations = 5L), class = c("seroincidence", "list"), lambda_start = 0.1, antigen_isos = c("HlyE_IgG", + "HlyE_IgA"))), antigen_isos = c("HlyE_IgG", "HlyE_IgA"), Strata = structure(list( + Stratum = c("Stratum 1", "Stratum 2"), catchment = c("aku", + "kgh"), n = c(25L, 25L)), row.names = c(NA, -2L), class = c("tbl_df", + "tbl", "data.frame"), strata_vars = "catchment"), graphs_included = FALSE, class = c("seroincidence.by", + "list")) + diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index b9cd210b..efa0197f 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -27,7 +27,7 @@ test_that( strata = c("catchment"), pop_data = xs_data, curve_param = curve, - curve_strata_varnames = NULL, + curve_strata_varnames = "catchment", noise_strata_varnames = "catchment", noise_param = noise, antigen_isos = c("HlyE_IgG", "HlyE_IgA"), @@ -59,7 +59,8 @@ test_that("`est.incidence.by()` produces expected results", { pop_data = xs_data_true, curve_params = curves, noise_params = noise %>% filter(Country == "Pakistan"), - antigen_isos = c("HlyE_IgG", "HlyE_IgA") + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + num_cores = 8 # Allow for parallel processing to decrease run time ) xs_data_false <- load_pop_data( @@ -78,7 +79,8 @@ test_that("`est.incidence.by()` produces expected results", { pop_data = xs_data_false, curve_params = curves, noise_params = noise %>% filter(Country == "Pakistan"), - antigen_isos = c("HlyE_IgG", "HlyE_IgA") + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + num_cores = 8 # Allow for parallel processing to decrease run time ) expect_equal(est_true, est_false) From 98c881d8e04675599cbf44d0ea3386e968e466eb Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Tue, 22 Oct 2024 10:42:19 +0300 Subject: [PATCH 19/61] reduce tests --- tests/testthat/_snaps/est.incidence.by.md | 25 ------ tests/testthat/_snaps/est.incidence.by.new.md | 30 ------- tests/testthat/test-est.incidence.by.R | 87 ------------------- 3 files changed, 142 deletions(-) delete mode 100644 tests/testthat/_snaps/est.incidence.by.md delete mode 100644 tests/testthat/_snaps/est.incidence.by.new.md diff --git a/tests/testthat/_snaps/est.incidence.by.md b/tests/testthat/_snaps/est.incidence.by.md deleted file mode 100644 index e77fb829..00000000 --- a/tests/testthat/_snaps/est.incidence.by.md +++ /dev/null @@ -1,25 +0,0 @@ -# est.incidence.by() produces expected results for typhoid data - - Code - typhoid_results - Output - `seroincidence.by` object estimated given the following setup: - a) Antigen isotypes : HlyE_IgG, HlyE_IgA - b) Strata : Country - - This object is a list of `seroincidence` objects, with added meta-data attributes:`antigen_isos` - Character vector of antigen isotypes used in analysis. - `Strata` - Input parameter strata of function `est.incidence.by()` - - Call the `summary()` function to obtain output results. - ---- - - structure(list("Stratum 1" = structure(list(minimum = 260.546868067556, - estimate = -2.02114708582914, gradient = 3.37492026736821e-07, - hessian = structure(37.570481481294, dim = c(1L, 1L)), code = 1L, - iterations = 4L), class = c("seroincidence", "list"), lambda_start = 0.1, antigen_isos = c("HlyE_IgG", - "HlyE_IgA"))), antigen_isos = c("HlyE_IgG", "HlyE_IgA"), Strata = structure(list( - Stratum = "Stratum 1", Country = "Pakistan", n = 50L), row.names = c(NA, - -1L), class = c("tbl_df", "tbl", "data.frame"), strata_vars = "Country"), graphs_included = FALSE, class = c("seroincidence.by", - "list")) - diff --git a/tests/testthat/_snaps/est.incidence.by.new.md b/tests/testthat/_snaps/est.incidence.by.new.md deleted file mode 100644 index 375c2981..00000000 --- a/tests/testthat/_snaps/est.incidence.by.new.md +++ /dev/null @@ -1,30 +0,0 @@ -# est.incidence.by() produces expected results for typhoid data - - Code - typhoid_results - Output - `seroincidence.by` object estimated given the following setup: - a) Antigen isotypes : HlyE_IgG, HlyE_IgA - b) Strata : catchment - - This object is a list of `seroincidence` objects, with added meta-data attributes:`antigen_isos` - Character vector of antigen isotypes used in analysis. - `Strata` - Input parameter strata of function `est.incidence.by()` - - Call the `summary()` function to obtain output results. - ---- - - structure(list("Stratum 1" = structure(list(minimum = 111.463434776159, - estimate = -2.41983536033088, gradient = -3.74675296382939e-06, - hessian = structure(15.251407603436, dim = c(1L, 1L)), code = 1L, - iterations = 4L), class = c("seroincidence", "list"), lambda_start = 0.1, antigen_isos = c("HlyE_IgG", - "HlyE_IgA")), "Stratum 2" = structure(list(minimum = 146.290052920951, - estimate = -1.640278556419, gradient = -8.66368377467952e-08, - hessian = structure(21.109488557163, dim = c(1L, 1L)), code = 1L, - iterations = 5L), class = c("seroincidence", "list"), lambda_start = 0.1, antigen_isos = c("HlyE_IgG", - "HlyE_IgA"))), antigen_isos = c("HlyE_IgG", "HlyE_IgA"), Strata = structure(list( - Stratum = c("Stratum 1", "Stratum 2"), catchment = c("aku", - "kgh"), n = c(25L, 25L)), row.names = c(NA, -2L), class = c("tbl_df", - "tbl", "data.frame"), strata_vars = "catchment"), graphs_included = FALSE, class = c("seroincidence.by", - "list")) - diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index efa0197f..e5ce435f 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -1,90 +1,3 @@ -test_that( - "est.incidence.by() produces expected results for typhoid data", - { - library(dplyr) - # get pop data - xs_data <- load_pop_data( - file_path = "https://osf.io/download//n6cp3/", - age = "Age", - value = "result", - id = "index_id", - standardize = TRUE - ) %>% - filter(Country == "Pakistan") %>% - slice_head(n = 100) - - # get noise data - noise <- load_noise_params("https://osf.io/download//hqy4v/") %>% - filter(Country == "Pakistan") - - # get curve data - curve <- load_curve_params("https://osf.io/download/rtw5k/") # slice if test is too slow (.by = antigen_iso)) - - # set start - start <- .05 - - typhoid_results <- est.incidence.by( - strata = c("catchment"), - pop_data = xs_data, - curve_param = curve, - curve_strata_varnames = "catchment", - noise_strata_varnames = "catchment", - noise_param = noise, - antigen_isos = c("HlyE_IgG", "HlyE_IgA"), - num_cores = 8 # Allow for parallel processing to decrease run time - ) - - expect_snapshot(x = typhoid_results) - - expect_snapshot_value(typhoid_results, style = "deparse") - } -) - -test_that("`est.incidence.by()` produces expected results", { - curves <- load_curve_params("https://osf.io/download/rtw5k/") - noise <- load_noise_params("https://osf.io/download//hqy4v/") - xs_data_true <- load_pop_data( - file_path = "https://osf.io/download//n6cp3/", - age = "Age", - value = "result", - id = "index_id", - standardize = TRUE - ) %>% - filter(Country == "Pakistan") %>% - slice_head(n = 100) - - - est_true <- est.incidence.by( - strata = c("catchment"), - pop_data = xs_data_true, - curve_params = curves, - noise_params = noise %>% filter(Country == "Pakistan"), - antigen_isos = c("HlyE_IgG", "HlyE_IgA"), - num_cores = 8 # Allow for parallel processing to decrease run time - ) - - xs_data_false <- load_pop_data( - file_path = "https://osf.io/download//n6cp3/", - age = "Age", - value = "result", - id = "index_id", - standardize = FALSE - ) %>% - filter(Country == "Pakistan") %>% - slice_head(n = 100) - - - est_false <- est.incidence.by( - strata = c("catchment"), - pop_data = xs_data_false, - curve_params = curves, - noise_params = noise %>% filter(Country == "Pakistan"), - antigen_isos = c("HlyE_IgG", "HlyE_IgA"), - num_cores = 8 # Allow for parallel processing to decrease run time - ) - - expect_equal(est_true, est_false) -}) test_that("est.incidence.by() issues warning when strata is missing", { From a2fc79a063c3380ff3dd2617d7bf6d62cb052ce3 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Tue, 22 Oct 2024 11:58:20 +0300 Subject: [PATCH 20/61] reduce num_cores to 1 --- tests/testthat/_snaps/est.incidence.by.md | 14 ++++ tests/testthat/test-est.incidence.by.R | 93 ++++++++++++++++++++++- 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 tests/testthat/_snaps/est.incidence.by.md diff --git a/tests/testthat/_snaps/est.incidence.by.md b/tests/testthat/_snaps/est.incidence.by.md new file mode 100644 index 00000000..a60bc604 --- /dev/null +++ b/tests/testthat/_snaps/est.incidence.by.md @@ -0,0 +1,14 @@ +# est.incidence.by() produces expected results for typhoid data + + Code + typhoid_results + Output + `seroincidence.by` object estimated given the following setup: + a) Antigen isotypes : HlyE_IgG, HlyE_IgA + b) Strata : catchment + + This object is a list of `seroincidence` objects, with added meta-data attributes:`antigen_isos` - Character vector of antigen isotypes used in analysis. + `Strata` - Input parameter strata of function `est.incidence.by()` + + Call the `summary()` function to obtain output results. + diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index e5ce435f..4e7b5218 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -1,6 +1,6 @@ test_that("est.incidence.by() issues warning when strata is missing", { - + library(dplyr) # get pop data xs_data <- load_pop_data( file_path = "https://osf.io/download//n6cp3/", @@ -30,3 +30,94 @@ test_that("est.incidence.by() issues warning when strata is missing", { ) }) + + +test_that( + "est.incidence.by() produces expected results for typhoid data", + { + library(dplyr) + # get pop data + xs_data <- load_pop_data( + file_path = "https://osf.io/download//n6cp3/", + age = "Age", + value = "result", + id = "index_id", + standardize = TRUE + ) %>% + filter(Country == "Pakistan") %>% + slice_head(n = 100) + + # get noise data + noise <- load_noise_params("https://osf.io/download//hqy4v/") %>% + filter(Country == "Pakistan") + + # get curve data + curve <- load_curve_params("https://osf.io/download/rtw5k/") # slice if test is too slow (.by = antigen_iso)) + + # set start + start <- .05 + + typhoid_results <- est.incidence.by( + strata = c("catchment"), + pop_data = xs_data, + curve_param = curve, + curve_strata_varnames = "catchment", + noise_strata_varnames = "catchment", + noise_param = noise, + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + # Allow for parallel processing to decrease run time + num_cores = 1 + ) + + expect_snapshot(x = typhoid_results) + + #expect_snapshot_value(typhoid_results, style = "deparse") + } +) + +test_that("`est.incidence.by()` produces expected results", { + library(dplyr) + curves <- load_curve_params("https://osf.io/download/rtw5k/") + noise <- load_noise_params("https://osf.io/download//hqy4v/") + xs_data_true <- load_pop_data( + file_path = "https://osf.io/download//n6cp3/", + age = "Age", + value = "result", + id = "index_id", + standardize = TRUE + ) %>% + filter(Country == "Pakistan") %>% + slice_head(n = 100) + + + est_true <- est.incidence.by( + strata = c("catchment"), + pop_data = xs_data_true, + curve_params = curves, + noise_params = noise %>% filter(Country == "Pakistan"), + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + num_cores = 1 # Allow for parallel processing to decrease run time + ) + + xs_data_false <- load_pop_data( + file_path = "https://osf.io/download//n6cp3/", + age = "Age", + value = "result", + id = "index_id", + standardize = FALSE + ) %>% + filter(Country == "Pakistan") %>% + slice_head(n = 100) + + + est_false <- est.incidence.by( + strata = c("catchment"), + pop_data = xs_data_false, + curve_params = curves, + noise_params = noise %>% filter(Country == "Pakistan"), + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + num_cores = 1 # Allow for parallel processing to decrease run time + ) + + expect_equal(est_true, est_false) +}) From 05aabc1d40f1eec3d68e587da95f7e9642ee944f Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Tue, 22 Oct 2024 15:54:03 +0300 Subject: [PATCH 21/61] add snapshots --- tests/testthat/_snaps/est.incidence.by.md | 16 ++++++++++++++++ tests/testthat/test-est.incidence.by.R | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/testthat/_snaps/est.incidence.by.md b/tests/testthat/_snaps/est.incidence.by.md index a60bc604..375c2981 100644 --- a/tests/testthat/_snaps/est.incidence.by.md +++ b/tests/testthat/_snaps/est.incidence.by.md @@ -12,3 +12,19 @@ Call the `summary()` function to obtain output results. +--- + + structure(list("Stratum 1" = structure(list(minimum = 111.463434776159, + estimate = -2.41983536033088, gradient = -3.74675296382939e-06, + hessian = structure(15.251407603436, dim = c(1L, 1L)), code = 1L, + iterations = 4L), class = c("seroincidence", "list"), lambda_start = 0.1, antigen_isos = c("HlyE_IgG", + "HlyE_IgA")), "Stratum 2" = structure(list(minimum = 146.290052920951, + estimate = -1.640278556419, gradient = -8.66368377467952e-08, + hessian = structure(21.109488557163, dim = c(1L, 1L)), code = 1L, + iterations = 5L), class = c("seroincidence", "list"), lambda_start = 0.1, antigen_isos = c("HlyE_IgG", + "HlyE_IgA"))), antigen_isos = c("HlyE_IgG", "HlyE_IgA"), Strata = structure(list( + Stratum = c("Stratum 1", "Stratum 2"), catchment = c("aku", + "kgh"), n = c(25L, 25L)), row.names = c(NA, -2L), class = c("tbl_df", + "tbl", "data.frame"), strata_vars = "catchment"), graphs_included = FALSE, class = c("seroincidence.by", + "list")) + diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index 4e7b5218..201f8e5e 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -71,7 +71,7 @@ test_that( expect_snapshot(x = typhoid_results) - #expect_snapshot_value(typhoid_results, style = "deparse") + expect_snapshot_value(typhoid_results, style = "deparse") } ) From c73eb38d7f95c2054f276a8136312ef0c8ef6cda Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Tue, 22 Oct 2024 17:45:29 +0300 Subject: [PATCH 22/61] linting --- tests/testthat/test-est.incidence.by.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index 201f8e5e..08542daf 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -52,7 +52,8 @@ test_that( filter(Country == "Pakistan") # get curve data - curve <- load_curve_params("https://osf.io/download/rtw5k/") # slice if test is too slow (.by = antigen_iso)) + curve <- load_curve_params("https://osf.io/download/rtw5k/") + # slice if test is too slow (.by = antigen_iso)) # set start start <- .05 From a78d82a6f0b14b6343ea4c6eb08184fd5aef329a Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Wed, 23 Oct 2024 06:54:43 +0300 Subject: [PATCH 23/61] correct tests --- tests/testthat/test-est.incidence.by.R | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index 08542daf..39620490 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -62,8 +62,8 @@ test_that( strata = c("catchment"), pop_data = xs_data, curve_param = curve, - curve_strata_varnames = "catchment", - noise_strata_varnames = "catchment", + curve_strata_varnames = NULL, + noise_strata_varnames = NULL, noise_param = noise, antigen_isos = c("HlyE_IgG", "HlyE_IgA"), # Allow for parallel processing to decrease run time @@ -80,6 +80,7 @@ test_that("`est.incidence.by()` produces expected results", { library(dplyr) curves <- load_curve_params("https://osf.io/download/rtw5k/") noise <- load_noise_params("https://osf.io/download//hqy4v/") + xs_data_true <- load_pop_data( file_path = "https://osf.io/download//n6cp3/", age = "Age", @@ -97,6 +98,8 @@ test_that("`est.incidence.by()` produces expected results", { curve_params = curves, noise_params = noise %>% filter(Country == "Pakistan"), antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + curve_strata_varnames = NULL, + noise_strata_varnames = NULL, num_cores = 1 # Allow for parallel processing to decrease run time ) @@ -116,6 +119,8 @@ test_that("`est.incidence.by()` produces expected results", { pop_data = xs_data_false, curve_params = curves, noise_params = noise %>% filter(Country == "Pakistan"), + curve_strata_varnames = NULL, + noise_strata_varnames = NULL, antigen_isos = c("HlyE_IgG", "HlyE_IgA"), num_cores = 1 # Allow for parallel processing to decrease run time ) From 23c8ec2e2bf62cbd814bb2f24499f91bacdbd9c3 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Wed, 23 Oct 2024 08:10:51 +0300 Subject: [PATCH 24/61] Increment version number to 1.2.0.9019 --- DESCRIPTION | 2 +- NEWS.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index a059428a..4c57a17d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: serocalculator Title: Estimating Infection Rates from Serological Data -Version: 1.2.0.9018 +Version: 1.2.0.9019 Authors@R: c( person("Peter", "Teunis", , "p.teunis@emory.edu", role = c("aut", "cph"), comment = "Author of the method and original code."), diff --git a/NEWS.md b/NEWS.md index b3fa10bc..f6ae53ce 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,5 @@ +# serocalculator (development version) + # serocalculator 1.3.0 ## New features From 510702576867a9dcccf06e8d91bb2732a2dc7295 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 12:12:14 -0800 Subject: [PATCH 25/61] more edits --- R/est.incidence.by.R | 18 ++++++++++++------ vignettes/.gitignore | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index 8ceb7a44..8f21628c 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -72,11 +72,17 @@ est.incidence.by <- function( print_graph = FALSE, ...) { if (missing(strata)) { - warning( - "The `strata` argument to `est.incidence.by()` is missing.", - "\n\n If you do not want to stratify your data, ", - "consider using the `est.incidence()` function to simplify your code and avoid this warning.", - "\n\n Since the `strata` argument is empty, `est.incidence.by()` will return a `seroincidence` object, instead of a `seroincidence.by` object.\n" + cli::cli_warn( + c( + "The {.arg strata} argument to {.fn est.incidence.by} is missing.", + "h" = "If you do not want to stratify your data, + consider using the {.fn est.incidence} function to + simplify your code and avoid this warning.", + "i" = "Since the {.arg strata} argument is empty, + {.fn est.incidence.by()} + will return a {.cls seroincidence} object, instead of a + {.cls seroincidence.by} object." + ) ) } @@ -116,7 +122,7 @@ est.incidence.by <- function( ) ) %>% setNames(missing_strata_vars) %>% - purrr::keep(~ length(.x) > 0)g + purrr::keep(~ length(.x) > 0) # strata with no match no_match_vars <- missing_strata_vars %>% diff --git a/vignettes/.gitignore b/vignettes/.gitignore index 9289a5e3..6a721db9 100644 --- a/vignettes/.gitignore +++ b/vignettes/.gitignore @@ -2,3 +2,4 @@ *.R methodology.log methodology_files +*.pptx From 3c8b8b13b62bbd1250ffc534e4e7781495693562 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 20:22:02 -0800 Subject: [PATCH 26/61] lots --- .Rbuildignore | 1 + R/check_strata.R | 65 ++++---- R/est.incidence.by.R | 8 +- R/example_noise_params_pk.R | 28 ++++ R/example_typhoid_curves_nostrat.R | 19 +++ R/sees_pop_data_pakistan_100.R | 23 ++- data-raw/example_noise_params_pk.R | 5 + data-raw/sees_pop_data_pakistan_100.R | 16 +- data-raw/typhoid_curves_nostrat_100.R | 5 + data/example_noise_params_pk.rda | Bin 0 -> 524 bytes data/example_typhoid_curves_nostrat.rda | Bin 0 -> 20926 bytes data/sees_pop_data_pakistan_100.rda | Bin 2533 -> 0 bytes ...ees_pop_data_pakistan_100_standardized.rda | Bin 3835 -> 0 bytes data/sees_pop_data_pk_100_nonstandardized.rda | Bin 0 -> 3821 bytes data/sees_pop_data_pk_100_standardized.rda | Bin 0 -> 3829 bytes data/typhoid_curves_nostrat_100.rda | Bin 0 -> 20921 bytes man/check_strata.Rd | 24 +++ man/example_noise_params_pk.Rd | 39 +++++ man/sees_pop_data_pk_100_nonstandardized.Rd | 32 ++++ ...d => sees_pop_data_pk_100_standardized.Rd} | 8 +- man/typhoid_curves_nostrat_100.Rd | 32 ++++ tests/testthat/_snaps/est.incidence.by.md | 14 +- tests/testthat/test-check_strata.R | 2 +- tests/testthat/test-est.incidence.by.R | 153 +++++++----------- 24 files changed, 324 insertions(+), 150 deletions(-) create mode 100644 R/example_noise_params_pk.R create mode 100644 R/example_typhoid_curves_nostrat.R create mode 100644 data-raw/example_noise_params_pk.R create mode 100644 data-raw/typhoid_curves_nostrat_100.R create mode 100644 data/example_noise_params_pk.rda create mode 100644 data/example_typhoid_curves_nostrat.rda delete mode 100644 data/sees_pop_data_pakistan_100.rda delete mode 100644 data/sees_pop_data_pakistan_100_standardized.rda create mode 100644 data/sees_pop_data_pk_100_nonstandardized.rda create mode 100644 data/sees_pop_data_pk_100_standardized.rda create mode 100644 data/typhoid_curves_nostrat_100.rda create mode 100644 man/check_strata.Rd create mode 100644 man/example_noise_params_pk.Rd create mode 100644 man/sees_pop_data_pk_100_nonstandardized.Rd rename man/{sees_pop_data_pakistan_100_standardized.Rd => sees_pop_data_pk_100_standardized.Rd} (80%) create mode 100644 man/typhoid_curves_nostrat_100.Rd diff --git a/.Rbuildignore b/.Rbuildignore index 958b4f56..77aa1893 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -29,4 +29,5 @@ allpopsamples_hlye.csv$ ^vignettes/\.quarto$ ^vignettes/methodology\.qmd$ ^\.quarto$ +^man/check_strata\.Rd$ ^man/df_to_array\.Rd$ diff --git a/R/check_strata.R b/R/check_strata.R index ab70edd3..0f08350c 100644 --- a/R/check_strata.R +++ b/R/check_strata.R @@ -1,7 +1,11 @@ +#' @title Check a `pop_data` object for requested strata variables +#' @param pop_data a `pop_data` object +#' @param strata a [character] vector +#' @returns [NULL], invisibly #' @examples -#' sees_pop_data_pakistan_100_standardized |> -# check_strata(strata = c("ag", "catch","Count")) -#' +#' sees_pop_data_pk_100_standardized |> +#' check_strata(strata = c("ag", "catch","Count")) +#' @dev check_strata <- function(pop_data, strata) { if (!is.character(strata)) { @@ -16,6 +20,10 @@ check_strata <- function(pop_data, strata) { if (length(missing_strata_vars) > 0) { + message0 = c( + "Can't stratify provided {.arg pop_data} with the provided {.arg strata}:", + "i" = "variable {.var {missing_strata_vars}} {?is/are} missing in {.arg pop_data}.") + partial_matches = purrr::map( missing_strata_vars, @@ -23,51 +31,36 @@ check_strata <- function(pop_data, strata) { stringr::str_subset( string = names(pop_data), pattern = x - ) + ) %>% + glue::backtick() %>% + and::or() ) %>% rlang::set_names(missing_strata_vars) %>% purrr::keep(~ length(.x) > 0) - # strata with no match - no_match_vars <- missing_strata_vars %>% - setdiff(names(partial_matches)) - - f1 = function() { - ul <- cli::cli_ul() - for (i in names(partial_matches)) - { - cli::cli_text("{.str i}:") - cli::cli_ul(partial_matches[[i]]) - } - cli::cli_end(ul) - } - - message1 = function() { - cli::cli_div() + inputs_with_partial_matches = names(partial_matches) - if (length(partial_matches) > 0) { - cli::cli_bullets( - c( - "i" = "The following input{?s} to {.arg strata} - {?is/are} likely misspelled: - {.var {names(partial_matches)}}", - "i" = "Did you mean:" - )) - f1() + if(length(partial_matches) > 0) + { - } + partial_matches = + glue::glue("\"{names(partial_matches)}\": {partial_matches}") - cli::cli_end() + message0 = c( + message0, + "i" = "The following input{?s} to {.arg strata} + might be misspelled: + {.str {inputs_with_partial_matches}}", + "i" = "Did you mean:", + partial_matches %>% rlang::set_names("*") + ) } - cli::cli_warn( + cli::cli_abort( class = "missing_var", call = rlang::caller_env(), - message = c( - "x" = "Can't stratify with the provided {.arg strata}:", - "i" = "{.var {missing_strata_vars}} {?is/are} missing in {.arg pop_data}."), - body = message1() + message = message0 ) } diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index b79d249f..a346b47e 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -92,15 +92,15 @@ est.incidence.by <- function( if (strata_is_empty) { cli::cli_warn( + class = "strata_empty", c( "The {.arg strata} argument to {.fn est.incidence.by} is missing.", "h" = "If you do not want to stratify your data, consider using the {.fn est.incidence} function to simplify your code and avoid this warning.", "i" = "Since the {.arg strata} argument is empty, - {.fn est.incidence.by()} - will return a {.cls seroincidence} object, instead of a - {.cls seroincidence.by} object." + {.fn est.incidence.by} will return a {.cls seroincidence} object, + instead of a {.cls seroincidence.by} object." ) ) @@ -118,7 +118,7 @@ est.incidence.by <- function( return(to_return) } - pop_data %>% check_strata(, strata = strata) + check_strata(pop_data, strata = strata) .errorCheck( data = pop_data, diff --git a/R/example_noise_params_pk.R b/R/example_noise_params_pk.R new file mode 100644 index 00000000..a0b00f9e --- /dev/null +++ b/R/example_noise_params_pk.R @@ -0,0 +1,28 @@ +#' @title Small example of noise parameters for typhoid +#' +#' @description A subset of noise parameter estimates from the SEES study, +#' for examples and testing. +#' +#' @format ## `example_noise_params_pk` +#' A `curve_params` object (from [as_curve()]) with 4 rows and 7 columns: +#' \describe{ +#' \item{antigen_iso}{which antigen and isotype are being measured +#' (data is in long format)} +#' \item{Country}{Location for which the noise parameters were estimated} +#' \item{y.low}{Lower limit of detection} +#' \item{eps}{Measurement noise, defined by a CV (coefficient of variation) +#' as the ratio of the standard deviation to the mean for replicates. +#' Note that the CV should ideally be measured across plates +#' rather than within the same plate.} +#' \item{nu}{Biological noise: error from cross-reactivity to other antibodies. +#' It is defined as the 95th percentile of +#' the distribution of antibody responses to the antigen-isotype +#' in a population with no exposure.} +#' \item{y.high}{Upper limit of detection} +#' \item{Lab}{Lab for which noise was estimated.} +#' } +#' @source +"example_noise_params_pk" + + + diff --git a/R/example_typhoid_curves_nostrat.R b/R/example_typhoid_curves_nostrat.R new file mode 100644 index 00000000..d70295fb --- /dev/null +++ b/R/example_typhoid_curves_nostrat.R @@ -0,0 +1,19 @@ +#' Small example of antibody response curve parameters for typhoid +#' +#' A subset of data from the SEES study, for examples and testing. +#' +#' @format ## `typhoid_curves_nostrat_100` +#' A `curve_params` object (from [as_curve()]) with 500 rows and 7 columns: +#' \describe{ +#' \item{antigen_iso}{which antigen and isotype are being measured +#' (data is in long format)} +#' \item{iter}{MCMC iteration} +#' \item{y0}{Antibody concentration at t = 0 (start of active infection)} +#' \item{y1}{Antibody concentration at t = `t1` (end of active infection)} +#' \item{t1}{Duration of active infection} +#' \item{alpha}{Antibody decay rate coefficient} +#' \item{r}{Antibody decay rate exponent parameter} +#' } +#' @source +"typhoid_curves_nostrat_100" + diff --git a/R/sees_pop_data_pakistan_100.R b/R/sees_pop_data_pakistan_100.R index 68410f2b..93677dae 100644 --- a/R/sees_pop_data_pakistan_100.R +++ b/R/sees_pop_data_pakistan_100.R @@ -2,7 +2,7 @@ #' #' A subset of data from the SEES data, for examples and testing. #' -#' @format ## `sees_pop_data_pakistan_100_standardized` +#' @format ## `sees_pop_data_pk_100_standardized` #' A `pop_data` object (from [as_pop_data()]) with 200 rows and 8 columns: #' \describe{ #' \item{id}{Observation ID} @@ -15,4 +15,23 @@ #' \item{value}{concentration of antigen isotype, in ELISA units} #' } #' @source -"sees_pop_data_pakistan_100_standardized" +"sees_pop_data_pk_100_standardized" + +#' Small example cross-sectional data set +#' +#' A subset of data from the SEES data, for examples and testing. +#' +#' @format ## `sees_pop_data_pk_100_nonstandardized` +#' A `pop_data` object (from [as_pop_data()]) with 200 rows and 8 columns: +#' \describe{ +#' \item{index_id}{Observation ID} +#' \item{Country}{Country where the participant was living} +#' \item{cluster}{survey sampling cluster} +#' \item{catchment}{survey catchment area} +#' \item{Age}{participant's age when sampled, in years} +#' \item{antigen_iso}{which antigen and isotype are being measured +#' (data is in long format)} +#' \item{result}{concentration of antigen isotype, in ELISA units} +#' } +#' @source +"sees_pop_data_pk_100_nonstandardized" diff --git a/data-raw/example_noise_params_pk.R b/data-raw/example_noise_params_pk.R new file mode 100644 index 00000000..650dfb56 --- /dev/null +++ b/data-raw/example_noise_params_pk.R @@ -0,0 +1,5 @@ +example_noise_params_pk <- + load_noise_params("https://osf.io/download//hqy4v/") %>% + filter(Country == "Pakistan") + +usethis::use_data(example_noise_params_pk, overwrite = TRUE) diff --git a/data-raw/sees_pop_data_pakistan_100.R b/data-raw/sees_pop_data_pakistan_100.R index 4638f4f9..b9139d85 100644 --- a/data-raw/sees_pop_data_pakistan_100.R +++ b/data-raw/sees_pop_data_pakistan_100.R @@ -1,4 +1,4 @@ -sees_pop_data_pakistan_100_standardized <- load_pop_data( +sees_pop_data_pk_100_standardized <- load_pop_data( file_path = "https://osf.io/download//n6cp3/", age = "Age", value = "result", @@ -8,4 +8,16 @@ sees_pop_data_pakistan_100_standardized <- load_pop_data( filter(Country == "Pakistan") %>% slice_head(n = 100, by = antigen_iso) -usethis::use_data(sees_pop_data_pakistan_100_standardized, overwrite = TRUE) +usethis::use_data(sees_pop_data_pk_100_standardized, overwrite = TRUE) + +sees_pop_data_pk_100_nonstandardized <- load_pop_data( + file_path = "https://osf.io/download//n6cp3/", + age = "Age", + value = "result", + id = "index_id", + standardize = FALSE +) %>% + filter(Country == "Pakistan") %>% + slice_head(n = 100, by = antigen_iso) + +usethis::use_data(sees_pop_data_pk_100_nonstandardized, overwrite = TRUE) diff --git a/data-raw/typhoid_curves_nostrat_100.R b/data-raw/typhoid_curves_nostrat_100.R new file mode 100644 index 00000000..b51057d2 --- /dev/null +++ b/data-raw/typhoid_curves_nostrat_100.R @@ -0,0 +1,5 @@ +typhoid_curves_nostrat_100 = + load_curve_params("https://osf.io/download/rtw5k/") %>% + dplyr::filter(iter %in% 1:100) + +usethis::use_data(typhoid_curves_nostrat_100, overwrite = TRUE) diff --git a/data/example_noise_params_pk.rda b/data/example_noise_params_pk.rda new file mode 100644 index 0000000000000000000000000000000000000000..685d12f3c18045e40b334db4d3516064d1cd1199 GIT binary patch literal 524 zcmV+n0`vVsT4*^jL0KkKS-7ka_W%J%fB*mgT&w^Em;(RrTgd!Mn|a8q3Q;J4Lu`G9+T8G(Da_BPg6rjlnqq! zDe7$0&?adOk{FDbO${1oGBncyFqoP$88l)v#KH+BH8f9Aq3UD+0000005Sm6KmY&$ zY2pl=LNG^ka*dG007XO)gXt0?JOL|{`>~xkX)Neo4;K~TvF$pFcDvJmqDl=26J_bbn{ zHCrG__DMd%5enDYr)?lXI23@ES^&xfdTK4Cl$jxS)_cycJ(poPeOL`zwL0KOh;lB5 zT(>2h1Qh|!3C*|222cTu;3E#TV>kkgvZx0Erz%^E8^hVBXbGU8qh*o8N;eFgjqsd% zG?Nb?6ymVmWdv7kUEYd6a||)dHhrtZi*v&)Bo9wFR^fELLr_WxNq0eYdZ@>RgF z4S@EBeG~=YXd>lL1=Ms`Y)ULiZlG=p(zEo^U9?hbh$)LkK*%I=h=qZ~2$L`I$i3NW z9D)Sc7@&<%aL5m(G}?Z-=j$|`3P}D#Dg`M3Q3NnTjK{IGA^tK~d*~F5L@FTP O;_gVN3KAC;f*#;R#@&bj literal 0 HcmV?d00001 diff --git a/data/example_typhoid_curves_nostrat.rda b/data/example_typhoid_curves_nostrat.rda new file mode 100644 index 0000000000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;i@;il{OSz>bM1GCuS9ys*Wvzi_e0m__XS#dKWNwj8C_dy<@nbs5$gct-O&ZIE9lQ20YE58=b?#a2<1LIvFcEF#pZS}VnxM{6T!Bfrvn+& zW}?*I0Me8)r$WbrOMD>zz~#BUL5NDt0CvQ2?1SLwnBM0~Ly^UJ@9+<*VB4Dns;`mL zu;pg>zD@`W-*_|WGvn6EpY02|3prJs?iT?aPl%ON8PD5iw?jjlyqBorP)AUIKecS( zidCVLUgD5!8E$UQw7``nv*f;86NyvyB8bRekSm*k&%Y4wTc%5%q8&bMn0^&&cY&ra zV&K#;yew^Cp36&VPyor_?vcEtUlNTd!YJE{Q@0isa z0wm?I%G2w!LJsst;Pxm8==)X;O2RBbvzsyj;&Wj}RVeX6OMbC}u4jpTv1igG!cWBs zq3s{fDw|H>)-(b(G@f?X+K3;q?KpioYs9`nh9^DroNsSy^>dQG#vs8D6F+h$QTAfn zP1)M;D;q^EuG#u)pkPFrs5BhEy{E9c=`Qxp!Y6cF_=q?r#!%FmmcxR8;K_O=n#mQ( zrP`xvMNFMXxoSIglMKQY6?qWzxr+e5sB4DqrtEy?JjetiKah|gEI3zBr{4&*Xn}xui3=*_x{+;b9rul;NDqcG1C#wApjr&rfk04I?Vi?X&b8KR z3A5D_G_JBV3{uJ`Dwhjl38h-{xfsfX3PmWE0tqX7OsmL#c_I{Lo~H>jEA8o^!#<ebRrW2oiacLim}AjSTw(CG?Apc(cEr5^~@?!{|(BiDh>) z8`*j&uMg~+h(nvetkgWwY zk)O?ggjy~_;<{BiK8exi_&Ej9!mKqEDmDJrWYKiG&_eklMKaK3X{m8X^Q=~!cg2LT zj%3AHrTg14*!dc`eaI%lhA+Fn+q?R-9I3@mdObomz;{Nz@E(=b_0^2PcOLfWqrK<+c-=VlcabR%W{ NV;L(5e$1?z`xj9)bP)gm diff --git a/data/sees_pop_data_pakistan_100_standardized.rda b/data/sees_pop_data_pakistan_100_standardized.rda deleted file mode 100644 index 6e58020979b0008aba506d26b70083bde906d380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(eT}OZAH@d54Qf5gRdx>nn?f4VB{%#O5dT&y-r+H={kclKA2cYV(BjCu+>F0e~a9j-gThC zP3qnu1tu6sFYeSM6fZh&G*2o}xo@l8o#m-k^-h7Zza|fU_;C8o^zSG34G2AXZ>-sS z4YSkfRj`}W%b0%kL1n-5{r(dvvn%L(ex0E-!91-+JpK*ikM^}S3%-+2UKGC{SvbBJ zTriF)z50teh2?Ft;?--Zv^!Mt96+8R2mFu$VWI3#_pBQ=skET=r;5El{xCn25p28z zx^*+8;akzx_NvuETPjA;q)|zw?|FJ%ux89kX_|Y<_jfrD8l88#Dq`Kmng?5JI=t^5 z_q?#HMD%}J^U9h2y#GAsTu{bTjW{>REmm6OlnegRlB<)@J)dfJ*k;r(;gL%%li{L~ zi2f_{j|_{%{OcNw&K)uWmJU1U6<;lwdrNE>MOPS=XWQj~QqEuB2vCjT|90J{-5M3) z{MKA8_hz$~SF_#lXVzVEwEMpDtd-IucTiY!;jhhOAKA~q>? zPOn0{DHv&TTCmzJ%+Zx2nK=kJN}k`utS?LH!n{z0zpw)8kvD!<^QB%r@aD|G5s)0X zK{$d}qxshbV40X`L}A#!3JAgurO3|9fJmCt3joV~au?3jA6d_kzCmLp#ojF5Eg}JG<8z5!-1dBdPZPPiaF>^CU6D>U&_OC{}1=S B<0Ak7 diff --git a/data/sees_pop_data_pk_100_nonstandardized.rda b/data/sees_pop_data_pk_100_nonstandardized.rda new file mode 100644 index 0000000000000000000000000000000000000000..0d3890a1401bb19d6a6bdc965b7809d08e00f192 GIT binary patch literal 3821 zcmah}dpHyB``(7xu#Cwu8sXCs3d;+eXj36-+#XM^<2;OyzhJ8_j6tEbG@&r8_7W1#8uJJ_2u)}ivUrB zz5j_>fjAkg;iN8&Ze)GulVIMp4`QR!lQpQ!*X$R^h$>}FRL?BEQzzJD89kUzCwY^A z%Q1?!_UTJ#^d=h3F2tj~wS2$~fuR@%dIEt!!em&s_RL{Kuhs}m2Io(exYOP4Eddx2 zLYEZEj|^Q=D!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*7}Z zcrQ3`WsDPdd18y1jj;E=pp_fNSQ~{>yzz;sBFXFo|HYf_vm183?;gqb z6bdxK3XdWCp^tIa2(Ofl@viJkuT<6!o~p^O9-F z^3Y7`n@y>9F>z0)L1Q^>MWtTSGx;rQ%ftH7{1-&^n%f6|z^2vG)jX$kA?h0$xebjj zh3Q$X{>&kfB^GEPr0)&rIl;cEm|vn6MJ%%_Gj88Jkym@VgQq z_REKH+_O_mIw4LB_rZ{&9%EUNu4vzkw5ZzZsc^nBc z6%H#Bu9m0W^i}GQyMOIo-E7atKlBnaUF3HBW{#x3 z*sH~5{eCqR>~f9sC^7CECc9$OPcEaesG+b-_uClz{zTDv(fXdwgE}aXuKM<-Q;0}~ z?tBj_^{ctrfR`)YO{CX@mv--DYxjD4WHY8@wEU)S$cDEu>W?k1hGu6Bh2QR%ZIUwm zA$=OEJ7rC1if(jpELW6+9lSf>db{7sUdQEx&=LQtHt=$$_DAni5qhb zBMVqKM4DSdmZuLL1%m9RcX1Y4fPL_Dke&I?tes4$cWvv_KXQE|RAYEvRmwp;gKmoR k_N>UBl0$*MLpXgMe0O45O_>>KyGQ0zLi1&#E^bZzA0-s(k^lez literal 0 HcmV?d00001 diff --git a/data/sees_pop_data_pk_100_standardized.rda b/data/sees_pop_data_pk_100_standardized.rda new file mode 100644 index 0000000000000000000000000000000000000000..a164d7ae0701a657da5015312c952115c2752954 GIT binary patch literal 3829 zcmah~c{tSH_kWLJ7)A|=F~ZPTk}?=1CSy0UBukO3gBeSrkgdj8V`NRXG{i6x36(@d zvM)o{6taydKDIuge)|2s|9t=Yy`I-O_nvd^J@eh8ifNk(Ep2QGe&6Ti|)UzUp`N=tNX@;;*Ykw923 zK&FG{fxiIb|7r;3uRZ|jK)5WeZQ{(qvVf5h2eBD2M;wvO<|L9@Z~}K@$P{x-4nIQH zCVzvyM_%Z9e zj1j%8NfE(??g7ge7bpcKP=w{j;*_g%-tnMf!7%nc2Q(I|UIw|K3r0n!xTOlB$am5B zaZY(E7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Dy+z}l@_&0aL#wB+3{*~^4`}~?3cqavNlRIyq;txOa=BF54{b7lXY*2RlD?_KQ_n$gqU%Gg2w59W*FA^-pY literal 0 HcmV?d00001 diff --git a/data/typhoid_curves_nostrat_100.rda b/data/typhoid_curves_nostrat_100.rda new file mode 100644 index 0000000000000000000000000000000000000000..f091aad521f69f18ea5e8d8f1bada815c8820d62 GIT binary patch literal 20921 zcmV(_K-9lNT4*^jL0KkKS!LR*Z2%cu|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0 z|NsC0|Nr1M9{>OV9R=Rw=grg7wR^X_?_2M0w|uW_-oD>&Rjv2F+^@IaeeC;_uJrZZ z>%Fyg>e<(qd%4!~@!ILPefPb)?{B@mzV~+d?Vm2bd8bJ~VgLg`G|&PkiRh=bO{Pqy#KAoiCXFfhm`yY= z5E@_&O)?mbF*0b=CYX`wJeZh)spM&@88iZEnv6_M4H^cR5@x2DOiUr9)5(|aE(9S+LlB1{aUl>w_YBB@IvxJB!%dO?1$Jw z_(J+Z{6p;_e<6S&fguz^EQDbQ(ikEbG7-ch$YBU!NJtRF5W|qf5X6wh5RoAyLQI6A z3|R?M7{VCPBfvZsRPg!?c>)Ajksv_?L_o2o2oNa=NMxuCh!7{dRIWj#rDYb#q!AGU z1&}fT5n>F8h!cI$gG{?}i^C9P*nw>gAi|kLZ8>8NK!bJR5N1ROihRHzu@M6R%*c!a zB$*I1AOq=;L68J=Xd){?klvUj42D#}1Q`sOkhqux5@bZ^WJIb^2pNDt%!C1e2q3`+ zV+0Ujh4QPH&BJPTD~MrChrq~vh5#VQ$O6cj5k#gbAcJX;A_+1gGa)fwKp>MKdh8Mi zdQ4f(Ll>rW?qJfj*cZjcJEIcC9Ssbm{lCz^5-D ziy@M*7gr?%zIRpmZl-7WzMV|l>YORotTufDRQ5;teh6~;y!MnHa}~Y)l1pr51(3z? zZyUvdcC;wlIiZ1*u8LtLM0NJBa#LR-%G4+>1WEz~2*|=Aw|AZrg5L;%qd3!eyUK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- /dev/null +++ b/man/check_strata.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/check_strata.R +\name{check_strata} +\alias{check_strata} +\title{Check a \code{pop_data} object for requested strata variables} +\usage{ +check_strata(pop_data, strata) +} +\arguments{ +\item{pop_data}{a \code{pop_data} object} + +\item{strata}{a \link{character} vector} +} +\value{ +\link{NULL}, invisibly +} +\description{ +Check a \code{pop_data} object for requested strata variables +} +\examples{ +sees_pop_data_pk_100_standardized |> + check_strata(strata = c("ag", "catch","Count")) +} +\keyword{internal} diff --git a/man/example_noise_params_pk.Rd b/man/example_noise_params_pk.Rd new file mode 100644 index 00000000..cd03f57e --- /dev/null +++ b/man/example_noise_params_pk.Rd @@ -0,0 +1,39 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/example_noise_params_pk.R +\docType{data} +\name{example_noise_params_pk} +\alias{example_noise_params_pk} +\title{Small example of noise parameters for typhoid} +\format{ +\subsection{\code{example_noise_params_pk}}{ + +A \code{curve_params} object (from \code{\link[=as_curve]{as_curve()}}) with 4 rows and 7 columns: +\describe{ +\item{antigen_iso}{which antigen and isotype are being measured +(data is in long format)} +\item{Country}{Location for which the noise parameters were estimated} +\item{y.low}{Lower limit of detection} +\item{eps}{Measurement noise, defined by a CV (coefficient of variation) +as the ratio of the standard deviation to the mean for replicates. +Note that the CV should ideally be measured across plates +rather than within the same plate.} +\item{nu}{Biological noise: error from cross-reactivity to other antibodies. +It is defined as the 95th percentile of +the distribution of antibody responses to the antigen-isotype +in a population with no exposure.} +\item{y.high}{Upper limit of detection} +\item{Lab}{Lab for which noise was estimated.} +} +} +} +\source{ +\url{https://osf.io/rtw5k} +} +\usage{ +example_noise_params_pk +} +\description{ +A subset of noise parameter estimates from the SEES study, +for examples and testing. +} +\keyword{datasets} diff --git a/man/sees_pop_data_pk_100_nonstandardized.Rd b/man/sees_pop_data_pk_100_nonstandardized.Rd new file mode 100644 index 00000000..a3b43332 --- /dev/null +++ b/man/sees_pop_data_pk_100_nonstandardized.Rd @@ -0,0 +1,32 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/sees_pop_data_pakistan_100.R +\docType{data} +\name{sees_pop_data_pk_100_nonstandardized} +\alias{sees_pop_data_pk_100_nonstandardized} +\title{Small example cross-sectional data set} +\format{ +\subsection{\code{sees_pop_data_pk_100_standardized}}{ + +A \code{pop_data} object (from \code{\link[=as_pop_data]{as_pop_data()}}) with 200 rows and 8 columns: +\describe{ +\item{index_id}{Observation ID} +\item{Country}{Country where the participant was living} +\item{cluster}{survey sampling cluster} +\item{catchment}{survey catchment area} +\item{Age}{participant's age when sampled, in years} +\item{antigen_iso}{which antigen and isotype are being measured +(data is in long format)} +\item{result}{concentration of antigen isotype, in ELISA units} +} +} +} +\source{ +\url{https://osf.io/n6cp3} +} +\usage{ +sees_pop_data_pk_100_nonstandardized +} +\description{ +A subset of data from the SEES data, for examples and testing. +} +\keyword{datasets} diff --git a/man/sees_pop_data_pakistan_100_standardized.Rd b/man/sees_pop_data_pk_100_standardized.Rd similarity index 80% rename from man/sees_pop_data_pakistan_100_standardized.Rd rename to man/sees_pop_data_pk_100_standardized.Rd index f67e5c50..9b31782d 100644 --- a/man/sees_pop_data_pakistan_100_standardized.Rd +++ b/man/sees_pop_data_pk_100_standardized.Rd @@ -1,11 +1,11 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/sees_pop_data_pakistan_100.R \docType{data} -\name{sees_pop_data_pakistan_100_standardized} -\alias{sees_pop_data_pakistan_100_standardized} +\name{sees_pop_data_pk_100_standardized} +\alias{sees_pop_data_pk_100_standardized} \title{Small example cross-sectional data set} \format{ -\subsection{\code{sees_pop_data_pakistan_100_standardized}}{ +\subsection{\code{sees_pop_data_pk_100_standardized}}{ A \code{pop_data} object (from \code{\link[=as_pop_data]{as_pop_data()}}) with 200 rows and 8 columns: \describe{ @@ -24,7 +24,7 @@ A \code{pop_data} object (from \code{\link[=as_pop_data]{as_pop_data()}}) with 2 \url{https://osf.io/n6cp3} } \usage{ -sees_pop_data_pakistan_100_standardized +sees_pop_data_pk_100_standardized } \description{ A subset of data from the SEES data, for examples and testing. diff --git a/man/typhoid_curves_nostrat_100.Rd b/man/typhoid_curves_nostrat_100.Rd new file mode 100644 index 00000000..ca976286 --- /dev/null +++ b/man/typhoid_curves_nostrat_100.Rd @@ -0,0 +1,32 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/example_typhoid_curves_nostrat.R +\docType{data} +\name{typhoid_curves_nostrat_100} +\alias{typhoid_curves_nostrat_100} +\title{Small example of antibody response curve parameters for typhoid} +\format{ +\subsection{\code{typhoid_curves_nostrat_100}}{ + +A \code{curve_params} object (from \code{\link[=as_curve]{as_curve()}}) with 500 rows and 7 columns: +\describe{ +\item{antigen_iso}{which antigen and isotype are being measured +(data is in long format)} +\item{iter}{MCMC iteration} +\item{y0}{Antibody concentration at t = 0 (start of active infection)} +\item{y1}{Antibody concentration at t = \code{t1} (end of active infection)} +\item{t1}{Duration of active infection} +\item{alpha}{Antibody decay rate coefficient} +\item{r}{Antibody decay rate exponent parameter} +} +} +} +\source{ +\url{https://osf.io/rtw5k} +} +\usage{ +typhoid_curves_nostrat_100 +} +\description{ +A subset of data from the SEES study, for examples and testing. +} +\keyword{datasets} diff --git a/tests/testthat/_snaps/est.incidence.by.md b/tests/testthat/_snaps/est.incidence.by.md index 375c2981..02c06a21 100644 --- a/tests/testthat/_snaps/est.incidence.by.md +++ b/tests/testthat/_snaps/est.incidence.by.md @@ -14,17 +14,17 @@ --- - structure(list("Stratum 1" = structure(list(minimum = 111.463434776159, - estimate = -2.41983536033088, gradient = -3.74675296382939e-06, - hessian = structure(15.251407603436, dim = c(1L, 1L)), code = 1L, + structure(list("Stratum 1" = structure(list(minimum = 269.456336163178, + estimate = -1.9659114149187, gradient = -9.97551535545146e-06, + hessian = structure(42.1287040808331, dim = c(1L, 1L)), code = 1L, iterations = 4L), class = c("seroincidence", "list"), lambda_start = 0.1, antigen_isos = c("HlyE_IgG", - "HlyE_IgA")), "Stratum 2" = structure(list(minimum = 146.290052920951, - estimate = -1.640278556419, gradient = -8.66368377467952e-08, - hessian = structure(21.109488557163, dim = c(1L, 1L)), code = 1L, + "HlyE_IgA")), "Stratum 2" = structure(list(minimum = 252.757931730411, + estimate = -1.61127190941552, gradient = 3.06923829056525e-06, + hessian = structure(44.1077020241307, dim = c(1L, 1L)), code = 1L, iterations = 5L), class = c("seroincidence", "list"), lambda_start = 0.1, antigen_isos = c("HlyE_IgG", "HlyE_IgA"))), antigen_isos = c("HlyE_IgG", "HlyE_IgA"), Strata = structure(list( Stratum = c("Stratum 1", "Stratum 2"), catchment = c("aku", - "kgh"), n = c(25L, 25L)), row.names = c(NA, -2L), class = c("tbl_df", + "kgh"), n = c(53L, 47L)), row.names = c(NA, -2L), class = c("tbl_df", "tbl", "data.frame"), strata_vars = "catchment"), graphs_included = FALSE, class = c("seroincidence.by", "list")) diff --git a/tests/testthat/test-check_strata.R b/tests/testthat/test-check_strata.R index 165ef531..6f626486 100644 --- a/tests/testthat/test-check_strata.R +++ b/tests/testthat/test-check_strata.R @@ -1,7 +1,7 @@ test_that("`check_strata()` throws an error when elements that don't exactly match the columns of `pop_data` are provided", { - sees_pop_data_pakistan_100_standardized |> + sees_pop_data_pk_100_standardized |> check_strata( strata = c("ag", "catch","Count") ) |> diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index a12ab4e5..c8b215c2 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -1,23 +1,16 @@ -test_that("est.incidence.by() warns user when strata is missing", { + +test_that("`est.incidence.by()` warns user when strata is missing", { library(dplyr) + # get pop data - xs_data <- load_pop_data( - file_path = "https://osf.io/download//n6cp3/", - age = "Age", - value = "result", - id = "index_id", - standardize = TRUE - ) %>% - filter(Country == "Pakistan") %>% - slice_head(n = 100) + xs_data <- sees_pop_data_pk_100_standardized # get noise data - noise <- load_noise_params("https://osf.io/download//hqy4v/") %>% - filter(Country == "Pakistan") + noise <- example_noise_params_pk # get curve data - curve <- load_curve_params("https://osf.io/download/rtw5k/") + curve <- typhoid_curves_nostrat_100 expect_warning( est.incidence.by( @@ -26,88 +19,69 @@ test_that("est.incidence.by() warns user when strata is missing", { noise_params = noise, antigen_isos = c("HlyE_IgG", "HlyE_IgA") ), - class = "missing_var" - ) -}) - -test_that("`est.incidence.by()` aborts when elements that don't exactly - match the columns of `pop_data` are provided", { - - expect_error( - object = est.incidence.by( - strata = c("ag", "catch","Count"), - pop_data = xs_data %>% filter(Country == "Pakistan"), - curve_params = curve, - noise_params = noise %>% filter(Country == "Pakistan"), - antigen_isos = c("HlyE_IgG", "HlyE_IgA"), - # num_cores = 8 # Allow for parallel processing to decrease run time - iterlim = 5 # limit iterations for the purpose of this example - ), - class = "missing_var" + class = "strata_empty" ) - }) - test_that( - "est.incidence.by() produces expected results for typhoid data", + "`est.incidence.by()` aborts when elements that don't exactly + match the columns of `pop_data` are provided", { - library(dplyr) - # get pop data - xs_data <- load_pop_data( - file_path = "https://osf.io/download//n6cp3/", - age = "Age", - value = "result", - id = "index_id", - standardize = TRUE - ) %>% - filter(Country == "Pakistan") %>% - slice_head(n = 100) - - # get noise data - noise <- load_noise_params("https://osf.io/download//hqy4v/") %>% - filter(Country == "Pakistan") - - # get curve data - curve <- load_curve_params("https://osf.io/download/rtw5k/") - # slice if test is too slow (.by = antigen_iso)) - - # set start - start <- .05 - - typhoid_results <- est.incidence.by( - strata = c("catchment"), - pop_data = xs_data, - curve_param = curve, - curve_strata_varnames = NULL, - noise_strata_varnames = NULL, - noise_param = noise, - antigen_isos = c("HlyE_IgG", "HlyE_IgA"), - # Allow for parallel processing to decrease run time - num_cores = 1 + xs_data <- sees_pop_data_pk_100_standardized + noise <- example_noise_params_pk + curve <- typhoid_curves_nostrat_100 + + expect_error( + object = est.incidence.by( + strata = c("ag", "catch", "Count"), + pop_data = xs_data, + curve_params = curve, + noise_params = noise %>% filter(Country == "Pakistan"), + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + # num_cores = 8 # Allow for parallel processing to decrease run time + iterlim = 5 # limit iterations for the purpose of this example + ), + class = "missing_var" ) - expect_snapshot(x = typhoid_results) - - expect_snapshot_value(typhoid_results, style = "deparse") } ) -test_that("`est.incidence.by()` produces expected results", { - library(dplyr) - curves <- load_curve_params("https://osf.io/download/rtw5k/") - noise <- load_noise_params("https://osf.io/download//hqy4v/") - - xs_data_true <- load_pop_data( - file_path = "https://osf.io/download//n6cp3/", - age = "Age", - value = "result", - id = "index_id", - standardize = TRUE - ) %>% - filter(Country == "Pakistan") %>% - slice_head(n = 100) +test_that("est.incidence.by() produces expected results for typhoid data", + { + library(dplyr) + # get pop data + xs_data <- sees_pop_data_pk_100_standardized + noise <- example_noise_params_pk + curve <- typhoid_curves_nostrat_100 + + # set start + start <- .05 + + typhoid_results <- est.incidence.by( + strata = c("catchment"), + pop_data = xs_data, + curve_param = curve, + curve_strata_varnames = NULL, + noise_strata_varnames = NULL, + noise_param = noise, + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + # Allow for parallel processing to decrease run time + num_cores = 1 + ) + + expect_snapshot(x = typhoid_results) + + expect_snapshot_value(typhoid_results, style = "deparse") + }) + +test_that("`est.incidence.by()` produces expected results + regardless of whether varnames have been standardized.", { + library(dplyr) + xs_data_true <- sees_pop_data_pk_100_standardized + noise <- example_noise_params_pk + curves <- typhoid_curves_nostrat_100 est_true <- est.incidence.by( strata = c("catchment"), @@ -120,16 +94,7 @@ test_that("`est.incidence.by()` produces expected results", { num_cores = 1 # Allow for parallel processing to decrease run time ) - xs_data_false <- load_pop_data( - file_path = "https://osf.io/download//n6cp3/", - age = "Age", - value = "result", - id = "index_id", - standardize = FALSE - ) %>% - filter(Country == "Pakistan") %>% - slice_head(n = 100) - + xs_data_false <- sees_pop_data_pk_100_nonstandardized est_false <- est.incidence.by( strata = c("catchment"), From cebb5be9ca36da7519303da2c571fd91b59df780 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 21:05:33 -0800 Subject: [PATCH 27/61] more cleanup --- R/est.incidence.by.R | 2 +- tests/testthat/test-est.incidence.by.R | 103 ++++++++++--------------- 2 files changed, 40 insertions(+), 65 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index a346b47e..1d49e899 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -95,7 +95,7 @@ est.incidence.by <- function( class = "strata_empty", c( "The {.arg strata} argument to {.fn est.incidence.by} is missing.", - "h" = "If you do not want to stratify your data, + "i" = "If you do not want to stratify your data, consider using the {.fn est.incidence} function to simplify your code and avoid this warning.", "i" = "Since the {.arg strata} argument is empty, diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index c8b215c2..211ec3a5 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -1,22 +1,13 @@ -test_that("`est.incidence.by()` warns user when strata is missing", { - library(dplyr) - - # get pop data - xs_data <- sees_pop_data_pk_100_standardized - - # get noise data - noise <- example_noise_params_pk - # get curve data - curve <- typhoid_curves_nostrat_100 +test_that("`est.incidence.by()` warns user when strata is missing", { expect_warning( est.incidence.by( - pop_data = xs_data, - curve_params = curve, - noise_params = noise, + pop_data = sees_pop_data_pk_100_standardized, + curve_params = typhoid_curves_nostrat_100, + noise_params = example_noise_params_pk, antigen_isos = c("HlyE_IgG", "HlyE_IgA") ), class = "strata_empty" @@ -27,18 +18,15 @@ test_that( "`est.incidence.by()` aborts when elements that don't exactly match the columns of `pop_data` are provided", { - xs_data <- sees_pop_data_pk_100_standardized - noise <- example_noise_params_pk - curve <- typhoid_curves_nostrat_100 - expect_error( object = est.incidence.by( strata = c("ag", "catch", "Count"), - pop_data = xs_data, - curve_params = curve, - noise_params = noise %>% filter(Country == "Pakistan"), + pop_data = sees_pop_data_pk_100_standardized, + curve_params = typhoid_curves_nostrat_100, + noise_params = example_noise_params_pk, antigen_isos = c("HlyE_IgG", "HlyE_IgA"), - # num_cores = 8 # Allow for parallel processing to decrease run time + num_cores = 8, + # Allow for parallel processing to decrease run time iterlim = 5 # limit iterations for the purpose of this example ), class = "missing_var" @@ -50,22 +38,13 @@ test_that( test_that("est.incidence.by() produces expected results for typhoid data", { - library(dplyr) - # get pop data - xs_data <- sees_pop_data_pk_100_standardized - noise <- example_noise_params_pk - curve <- typhoid_curves_nostrat_100 - - # set start - start <- .05 - typhoid_results <- est.incidence.by( strata = c("catchment"), - pop_data = xs_data, - curve_param = curve, + pop_data = sees_pop_data_pk_100_standardized, + curve_param = typhoid_curves_nostrat_100, curve_strata_varnames = NULL, noise_strata_varnames = NULL, - noise_param = noise, + noise_param = example_noise_params_pk, antigen_isos = c("HlyE_IgG", "HlyE_IgA"), # Allow for parallel processing to decrease run time num_cores = 1 @@ -76,36 +55,32 @@ test_that("est.incidence.by() produces expected results for typhoid data", expect_snapshot_value(typhoid_results, style = "deparse") }) -test_that("`est.incidence.by()` produces expected results - regardless of whether varnames have been standardized.", { - library(dplyr) - xs_data_true <- sees_pop_data_pk_100_standardized - noise <- example_noise_params_pk - curves <- typhoid_curves_nostrat_100 - - est_true <- est.incidence.by( - strata = c("catchment"), - pop_data = xs_data_true, - curve_params = curves, - noise_params = noise %>% filter(Country == "Pakistan"), - antigen_isos = c("HlyE_IgG", "HlyE_IgA"), - curve_strata_varnames = NULL, - noise_strata_varnames = NULL, - num_cores = 1 # Allow for parallel processing to decrease run time - ) - - xs_data_false <- sees_pop_data_pk_100_nonstandardized +test_that( + "`est.incidence.by()` produces expected results + regardless of whether varnames have been standardized.", + { + est_true <- est.incidence.by( + strata = c("catchment"), + pop_data = sees_pop_data_pk_100_standardized, + curve_params = typhoid_curves_nostrat_100, + noise_params = example_noise_params_pk, + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + curve_strata_varnames = NULL, + noise_strata_varnames = NULL, + num_cores = 1 # Allow for parallel processing to decrease run time + ) - est_false <- est.incidence.by( - strata = c("catchment"), - pop_data = xs_data_false, - curve_params = curves, - noise_params = noise %>% filter(Country == "Pakistan"), - curve_strata_varnames = NULL, - noise_strata_varnames = NULL, - antigen_isos = c("HlyE_IgG", "HlyE_IgA"), - num_cores = 1 # Allow for parallel processing to decrease run time - ) + est_false <- est.incidence.by( + strata = c("catchment"), + pop_data = sees_pop_data_pk_100_nonstandardized, + curve_params = typhoid_curves_nostrat_100, + noise_params = example_noise_params_pk, + curve_strata_varnames = NULL, + noise_strata_varnames = NULL, + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + num_cores = 1 # Allow for parallel processing to decrease run time + ) - expect_equal(est_true, est_false) -}) + expect_equal(est_true, est_false) + } +) From a5f4ff6448f5c407e1d674a74042e9c336687551 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 21:06:22 -0800 Subject: [PATCH 28/61] update documentation --- man/sees_pop_data_pk_100_nonstandardized.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/sees_pop_data_pk_100_nonstandardized.Rd b/man/sees_pop_data_pk_100_nonstandardized.Rd index a3b43332..44005dd8 100644 --- a/man/sees_pop_data_pk_100_nonstandardized.Rd +++ b/man/sees_pop_data_pk_100_nonstandardized.Rd @@ -5,7 +5,7 @@ \alias{sees_pop_data_pk_100_nonstandardized} \title{Small example cross-sectional data set} \format{ -\subsection{\code{sees_pop_data_pk_100_standardized}}{ +\subsection{\code{sees_pop_data_pk_100_nonstandardized}}{ A \code{pop_data} object (from \code{\link[=as_pop_data]{as_pop_data()}}) with 200 rows and 8 columns: \describe{ From 7dc8a6ccfd3467f57f0df4683fb20f61e5ad7d15 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 21:10:08 -0800 Subject: [PATCH 29/61] - added {and} package --- DESCRIPTION | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index a059428a..49ede40d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -39,7 +39,8 @@ Imports: tidyr, tidyselect, utils, - purrr + purrr, + and Suggests: bookdown, devtag (>= 0.0.0.9000), From 7cb6af9654db00c758ebfd72e352424a53a78bf5 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 21:19:42 -0800 Subject: [PATCH 30/61] cleanup --- R/example_noise_params_pk.R | 2 +- R/example_typhoid_curves_nostrat.R | 2 +- man/example_noise_params_pk.Rd | 2 +- man/typhoid_curves_nostrat_100.Rd | 2 +- tests/testthat/_snaps/est.incidence.by.md | 2 +- tests/testthat/test-est.incidence.by.R | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/example_noise_params_pk.R b/R/example_noise_params_pk.R index a0b00f9e..ac380f40 100644 --- a/R/example_noise_params_pk.R +++ b/R/example_noise_params_pk.R @@ -4,7 +4,7 @@ #' for examples and testing. #' #' @format ## `example_noise_params_pk` -#' A `curve_params` object (from [as_curve()]) with 4 rows and 7 columns: +#' A `curve_params` object (from [as_curve_params()]) with 4 rows and 7 columns: #' \describe{ #' \item{antigen_iso}{which antigen and isotype are being measured #' (data is in long format)} diff --git a/R/example_typhoid_curves_nostrat.R b/R/example_typhoid_curves_nostrat.R index d70295fb..455d6021 100644 --- a/R/example_typhoid_curves_nostrat.R +++ b/R/example_typhoid_curves_nostrat.R @@ -3,7 +3,7 @@ #' A subset of data from the SEES study, for examples and testing. #' #' @format ## `typhoid_curves_nostrat_100` -#' A `curve_params` object (from [as_curve()]) with 500 rows and 7 columns: +#' A `curve_params` object (from [as_curve_params()]) with 500 rows and 7 columns: #' \describe{ #' \item{antigen_iso}{which antigen and isotype are being measured #' (data is in long format)} diff --git a/man/example_noise_params_pk.Rd b/man/example_noise_params_pk.Rd index cd03f57e..d19565f4 100644 --- a/man/example_noise_params_pk.Rd +++ b/man/example_noise_params_pk.Rd @@ -7,7 +7,7 @@ \format{ \subsection{\code{example_noise_params_pk}}{ -A \code{curve_params} object (from \code{\link[=as_curve]{as_curve()}}) with 4 rows and 7 columns: +A \code{curve_params} object (from \code{\link[=as_curve_params]{as_curve_params()}}) with 4 rows and 7 columns: \describe{ \item{antigen_iso}{which antigen and isotype are being measured (data is in long format)} diff --git a/man/typhoid_curves_nostrat_100.Rd b/man/typhoid_curves_nostrat_100.Rd index ca976286..97f2ca09 100644 --- a/man/typhoid_curves_nostrat_100.Rd +++ b/man/typhoid_curves_nostrat_100.Rd @@ -7,7 +7,7 @@ \format{ \subsection{\code{typhoid_curves_nostrat_100}}{ -A \code{curve_params} object (from \code{\link[=as_curve]{as_curve()}}) with 500 rows and 7 columns: +A \code{curve_params} object (from \code{\link[=as_curve_params]{as_curve_params()}}) with 500 rows and 7 columns: \describe{ \item{antigen_iso}{which antigen and isotype are being measured (data is in long format)} diff --git a/tests/testthat/_snaps/est.incidence.by.md b/tests/testthat/_snaps/est.incidence.by.md index 02c06a21..110b0362 100644 --- a/tests/testthat/_snaps/est.incidence.by.md +++ b/tests/testthat/_snaps/est.incidence.by.md @@ -1,4 +1,4 @@ -# est.incidence.by() produces expected results for typhoid data +# `est.incidence.by()` produces consistent results for typhoid data Code typhoid_results diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index 211ec3a5..73bddbd9 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -36,10 +36,10 @@ test_that( ) -test_that("est.incidence.by() produces expected results for typhoid data", +test_that("`est.incidence.by()` produces consistent results for typhoid data", { typhoid_results <- est.incidence.by( - strata = c("catchment"), + strata = "catchment", pop_data = sees_pop_data_pk_100_standardized, curve_param = typhoid_curves_nostrat_100, curve_strata_varnames = NULL, From 41435d67e8db7b5ad112c8ec6209cb538a3dc8ef Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 21:20:49 -0800 Subject: [PATCH 31/61] add `glue` and `stringr` --- DESCRIPTION | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 49ede40d..c4784efb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -40,7 +40,9 @@ Imports: tidyselect, utils, purrr, - and + and, + glue, + stringr Suggests: bookdown, devtag (>= 0.0.0.9000), From 737a1c6531a1f88cb729203a1a306e861f08f268 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 21:31:54 -0800 Subject: [PATCH 32/61] add test to `check_strata()` --- R/check_strata.R | 32 ++++++++++-------------------- tests/testthat/test-check_strata.R | 21 ++++++++++++-------- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/R/check_strata.R b/R/check_strata.R index 0f08350c..1e347aa6 100644 --- a/R/check_strata.R +++ b/R/check_strata.R @@ -7,42 +7,32 @@ #' check_strata(strata = c("ag", "catch","Count")) #' @dev check_strata <- function(pop_data, strata) { - if (!is.character(strata)) { - cli::cli_abort(c( - "x" = "Argument `strata` is not a character vector.", - "i" = "Provide a character vector with names of stratifying variables." - )) + cli::cli_abort( + class = "strata are not strings", + c("x" = "Argument `strata` is not a character vector.", "i" = "Provide a character vector with names of stratifying variables.") + ) } present_strata_vars = intersect(strata, names(pop_data)) missing_strata_vars = setdiff(strata, present_strata_vars) if (length(missing_strata_vars) > 0) { - - message0 = c( - "Can't stratify provided {.arg pop_data} with the provided {.arg strata}:", - "i" = "variable {.var {missing_strata_vars}} {?is/are} missing in {.arg pop_data}.") + message0 = c("Can't stratify provided {.arg pop_data} with the provided {.arg strata}:", + "i" = "variable {.var {missing_strata_vars}} {?is/are} missing in {.arg pop_data}.") partial_matches = - purrr::map( - missing_strata_vars, - function(x) - stringr::str_subset( - string = names(pop_data), - pattern = x - ) %>% + purrr::map(missing_strata_vars, function(x) + stringr::str_subset(string = names(pop_data), pattern = x) %>% glue::backtick() %>% - and::or() - ) %>% + and::or()) %>% rlang::set_names(missing_strata_vars) %>% - purrr::keep(~ length(.x) > 0) + purrr::keep( ~ length(.x) > 0) inputs_with_partial_matches = names(partial_matches) - if(length(partial_matches) > 0) + if (length(partial_matches) > 0) { - partial_matches = glue::glue("\"{names(partial_matches)}\": {partial_matches}") diff --git a/tests/testthat/test-check_strata.R b/tests/testthat/test-check_strata.R index 6f626486..b054ef2b 100644 --- a/tests/testthat/test-check_strata.R +++ b/tests/testthat/test-check_strata.R @@ -1,11 +1,16 @@ -test_that("`check_strata()` throws an error when elements that don't exactly - match the columns of `pop_data` are provided", { +test_that( + "`check_strata()` throws an error when elements that don't exactly + match the columns of `pop_data` are provided", + { + sees_pop_data_pk_100_standardized |> + check_strata(strata = c("ag", "catch", "Count")) |> + expect_error(class = "missing_var") + } +) +test_that("`check_strata()` throws an error when `strata` is not a `character`", + { sees_pop_data_pk_100_standardized |> - check_strata( - strata = c("ag", "catch","Count") - ) |> - expect_error(class = "missing_var") - - + check_strata(strata = c(1,4)) |> + expect_error(class = "strata are not strings") }) From 7ba202bfdb25ed51bf10e2d55eb4261bb99db261 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 21:34:23 -0800 Subject: [PATCH 33/61] remove redundant example data --- data/example_typhoid_curves_nostrat.rda | Bin 20926 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 data/example_typhoid_curves_nostrat.rda diff --git a/data/example_typhoid_curves_nostrat.rda b/data/example_typhoid_curves_nostrat.rda deleted file mode 100644 index 316117b34b9541d444dfdd1ab13b5c8b92189a4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20926 zcmV)FK)=62T4*^jL0KkKS<7oOV0Q%5%=|gX~$G&_wXLr2bzU{lswzt0P*z4Zcw)O8lb(`Ma^Se&% zy|9;K*KF?Yj_#++uJhyW_r2MlNc)@Tk=3<6_uE&iV)?$@-nq5!Z)Cjd-uv6lX1CnC z=3RPi?^=6X7TPVHyW6Y1T~AHkk9&L9o8EV>!0o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changed, 2 insertions(+), 1 deletion(-) diff --git a/R/example_typhoid_curves_nostrat.R b/R/example_typhoid_curves_nostrat.R index 455d6021..62775696 100644 --- a/R/example_typhoid_curves_nostrat.R +++ b/R/example_typhoid_curves_nostrat.R @@ -3,7 +3,8 @@ #' A subset of data from the SEES study, for examples and testing. #' #' @format ## `typhoid_curves_nostrat_100` -#' A `curve_params` object (from [as_curve_params()]) with 500 rows and 7 columns: +#' A `curve_params` object (from [as_curve_params()]) with 500 rows and 7 +#' columns: #' \describe{ #' \item{antigen_iso}{which antigen and isotype are being measured #' (data is in long format)} From 84784159162414330ca61cdbc850419b1b6df896 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 22:56:33 -0800 Subject: [PATCH 35/61] remove redundant files --- data/sees_pop_data_pk_100_nonstandardized.rda | Bin 3821 -> 0 bytes data/sees_pop_data_pk_100_standardized.rda | Bin 3829 -> 0 bytes man/sees_pop_data_pk_100_nonstandardized.Rd | 32 ------------------ man/sees_pop_data_pk_100_standardized.Rd | 32 ------------------ 4 files changed, 64 deletions(-) delete mode 100644 data/sees_pop_data_pk_100_nonstandardized.rda delete mode 100644 data/sees_pop_data_pk_100_standardized.rda delete mode 100644 man/sees_pop_data_pk_100_nonstandardized.Rd delete mode 100644 man/sees_pop_data_pk_100_standardized.Rd diff --git a/data/sees_pop_data_pk_100_nonstandardized.rda b/data/sees_pop_data_pk_100_nonstandardized.rda deleted file mode 100644 index 0d3890a1401bb19d6a6bdc965b7809d08e00f192..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3821 zcmah}dpHyB``(7xu#Cwu8sXCs3d;+eXj36-+#XM^<2;OyzhJ8_j6tEbG@&r8_7W1#8uJJ_2u)}ivUrB zz5j_>fjAkg;iN8&Ze)GulVIMp4`QR!lQpQ!*X$R^h$>}FRL?BEQzzJD89kUzCwY^A z%Q1?!_UTJ#^d=h3F2tj~wS2$~fuR@%dIEt!!em&s_RL{Kuhs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uJ{4SV7nu>3@oyN%HT8e3nC;riR9Bb*7}Z zcrQ3`WsDPdd18y1jj;E=pp_fNSQ~{>yzz;sBFXFo|HYf_vm183?;gqb z6bdxK3XdWCp^tIa2(Ofl@viJkuT<6!o~p^O9-F z^3Y7`n@y>9F>z0)L1Q^>MWtTSGx;rQ%ftH7{1-&^n%f6|z^2vG)jX$kA?h0$xebjj zh3Q$X{>&kfB^GEPr0)&rIl;cEm|vn6MJ%%_Gj88Jkym@VgQq z_REKH+_O_mIw4LB_rZ{&9%EUNu4vzkw5ZzZsc^nBc z6%H#Bu9m0W^i}GQyMOIo-E7atKlBnaUF3HBW{#x3 z*sH~5{eCqR>~f9sC^7CECc9$OPcEaesG+b-_uClz{zTDv(fXdwgE}aXuKM<-Q;0}~ z?tBj_^{ctrfR`)YO{CX@mv--DYxjD4WHY8@wEU)S$cDEu>W?k1hGu6Bh2QR%ZIUwm zA$=OEJ7rC1if(jpELW6+9lSf>db{7sUdQEx&=LQtHt=$$_DAni5qhb zBMVqKM4DSdmZuLL1%m9RcX1Y4fPL_Dke&I?tes4$cWvv_KXQE|RAYEvRmwp;gKmoR k_N>UBl0$*MLpXgMe0O45O_>>KyGQ0zLi1&#E^bZzA0-s(k^lez diff --git a/data/sees_pop_data_pk_100_standardized.rda b/data/sees_pop_data_pk_100_standardized.rda deleted file mode 100644 index a164d7ae0701a657da5015312c952115c2752954..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3829 zcmah~c{tSH_kWLJ7)A|=F~ZPTk}?=1CSy0UBukO3gBeSrkgdj8V`NRXG{i6x36(@d zvM)o{6taydKDIuge)|2s|9t=Yy`I-O_nvd^J@eh8ifNk(Ep2QGe&6Ti|)UzUp`N=tNX@;;*Ykw923 zK&FG{fxiIb|7r;3uRZ|jK)5WeZQ{(qvVf5h2eBD2M;wvO<|L9@Z~}K@$P{x-4nIQH zCVzvyM_%Z9e zj1j%8NfE(??g7ge7bpcKP=w{j;*_g%-tnMf!7%nc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#hhgbe^aDx)G9OqNu z?o4~Ob}~x}h+FDy+z}l@_&0aL#wB+3{*~^4`}~?3cqavNlRIyq;txOa=BF54{b7lXY*2RlD?_KQ_n$gqU%Gg2w59W*FA^-pY diff --git a/man/sees_pop_data_pk_100_nonstandardized.Rd b/man/sees_pop_data_pk_100_nonstandardized.Rd deleted file mode 100644 index 44005dd8..00000000 --- a/man/sees_pop_data_pk_100_nonstandardized.Rd +++ /dev/null @@ -1,32 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/sees_pop_data_pakistan_100.R -\docType{data} -\name{sees_pop_data_pk_100_nonstandardized} -\alias{sees_pop_data_pk_100_nonstandardized} -\title{Small example cross-sectional data set} -\format{ -\subsection{\code{sees_pop_data_pk_100_nonstandardized}}{ - -A \code{pop_data} object (from \code{\link[=as_pop_data]{as_pop_data()}}) with 200 rows and 8 columns: -\describe{ -\item{index_id}{Observation ID} -\item{Country}{Country where the participant was living} -\item{cluster}{survey sampling cluster} -\item{catchment}{survey catchment area} -\item{Age}{participant's age when sampled, in years} -\item{antigen_iso}{which antigen and isotype are being measured -(data is in long format)} -\item{result}{concentration of antigen isotype, in ELISA units} -} -} -} -\source{ -\url{https://osf.io/n6cp3} -} -\usage{ -sees_pop_data_pk_100_nonstandardized -} -\description{ -A subset of data from the SEES data, for examples and testing. -} -\keyword{datasets} diff --git a/man/sees_pop_data_pk_100_standardized.Rd b/man/sees_pop_data_pk_100_standardized.Rd deleted file mode 100644 index 9b31782d..00000000 --- a/man/sees_pop_data_pk_100_standardized.Rd +++ /dev/null @@ -1,32 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/sees_pop_data_pakistan_100.R -\docType{data} -\name{sees_pop_data_pk_100_standardized} -\alias{sees_pop_data_pk_100_standardized} -\title{Small example cross-sectional data set} -\format{ -\subsection{\code{sees_pop_data_pk_100_standardized}}{ - -A \code{pop_data} object (from \code{\link[=as_pop_data]{as_pop_data()}}) with 200 rows and 8 columns: -\describe{ -\item{id}{Observation ID} -\item{Country}{Country where the participant was living} -\item{cluster}{survey sampling cluster} -\item{catchment}{survey catchment area} -\item{age}{participant's age when sampled, in years} -\item{antigen_iso}{which antigen and isotype are being measured -(data is in long format)} -\item{value}{concentration of antigen isotype, in ELISA units} -} -} -} -\source{ -\url{https://osf.io/n6cp3} -} -\usage{ -sees_pop_data_pk_100_standardized -} -\description{ -A subset of data from the SEES data, for examples and testing. -} -\keyword{datasets} From 9c9626feb2ece8d4939fbcd5cc21615693445bd0 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 22:58:36 -0800 Subject: [PATCH 36/61] delete unused files --- data/sees_pop_data_pk_100_nonstandardized.rda | Bin 3821 -> 0 bytes data/sees_pop_data_pk_100_standardized.rda | Bin 3829 -> 0 bytes man/sees_pop_data_pk_100_nonstandardized.Rd | 32 ------------------ man/sees_pop_data_pk_100_standardized.Rd | 32 ------------------ 4 files changed, 64 deletions(-) delete mode 100644 data/sees_pop_data_pk_100_nonstandardized.rda delete mode 100644 data/sees_pop_data_pk_100_standardized.rda delete mode 100644 man/sees_pop_data_pk_100_nonstandardized.Rd delete mode 100644 man/sees_pop_data_pk_100_standardized.Rd diff --git a/data/sees_pop_data_pk_100_nonstandardized.rda b/data/sees_pop_data_pk_100_nonstandardized.rda deleted file mode 100644 index 0d3890a1401bb19d6a6bdc965b7809d08e00f192..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3821 zcmah}dpHyB``(7xu#Cwu8sXCs3d;+eXj36-+#XM^<2;OyzhJ8_j6tEbG@&r8_7W1#8uJJ_2u)}ivUrB zz5j_>fjAkg;iN8&Ze)GulVIMp4`QR!lQpQ!*X$R^h$>}FRL?BEQzzJD89kUzCwY^A z%Q1?!_UTJ#^d=h3F2tj~wS2$~fuR@%dIEt!!em&s_RL{Kuhs}m2Io(exYOP4Eddx2 zLYEZEj|^Q=D!*Q~v>Ys%Q#7(MksF_DGeU42WRF6D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fNSQ~{>yzz;sBFXFo|HYf_vm183?;gqb z6bdxK3XdWCp^tIa2(Ofl@viJkuT<6!o~p^O9-F z^3Y7`n@y>9F>z0)L1Q^>MWtTSGx;rQ%ftH7{1-&^n%f6|z^2vG)jX$kA?h0$xebjj zh3Q$X{>&kfB^GEPr0)&rIl;cEm|vn6MJ%%_Gj88Jkym@VgQq z_REKH+_O_mIw4LB_rZ{&9%EUNu4vzkw5ZzZsc^nBc z6%H#Bu9m0W^i}GQyMOIo-E7atKlBnaUF3HBW{#x3 z*sH~5{eCqR>~f9sC^7CECc9$OPcEaesG+b-_uClz{zTDv(fXdwgE}aXuKM<-Q;0}~ z?tBj_^{ctrfR`)YO{CX@mv--DYxjD4WHY8@wEU)S$cDEu>W?k1hGu6Bh2QR%ZIUwm zA$=OEJ7rC1if(jpELW6+9lSf>db{7sUdQEx&=LQtHt=$$_DAni5qhb zBMVqKM4DSdmZuLL1%m9RcX1Y4fPL_Dke&I?tes4$cWvv_KXQE|RAYEvRmwp;gKmoR k_N>UBl0$*MLpXgMe0O45O_>>KyGQ0zLi1&#E^bZzA0-s(k^lez diff --git a/data/sees_pop_data_pk_100_standardized.rda b/data/sees_pop_data_pk_100_standardized.rda deleted file mode 100644 index a164d7ae0701a657da5015312c952115c2752954..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3829 zcmah~c{tSH_kWLJ7)A|=F~ZPTk}?=1CSy0UBukO3gBeSrkgdj8V`NRXG{i6x36(@d zvM)o{6taydKDIuge)|2s|9t=Yy`I-O_nvd^J@eh8ifNk(Ep2QGe&6Ti|)UzUp`N=tNX@;;*Ykw923 zK&FG{fxiIb|7r;3uRZ|jK)5WeZQ{(qvVf5h2eBD2M;wvO<|L9@Z~}K@$P{x-4nIQH zCVzvyM_%Z9e zj1j%8NfE(??g7ge7bpcKP=w{j;*_g%-tnMf!7%nc2Q(I|UIw|K3r0n!xTOlB$am5B zaZY(E7uektg6}w{!l1jfFb{zeVJcEA5>|8*$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qavNlRIyq;txOa=BF54{b7lXY*2RlD?_KQ_n$gqU%Gg2w59W*FA^-pY diff --git a/man/sees_pop_data_pk_100_nonstandardized.Rd b/man/sees_pop_data_pk_100_nonstandardized.Rd deleted file mode 100644 index 44005dd8..00000000 --- a/man/sees_pop_data_pk_100_nonstandardized.Rd +++ /dev/null @@ -1,32 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/sees_pop_data_pakistan_100.R -\docType{data} -\name{sees_pop_data_pk_100_nonstandardized} -\alias{sees_pop_data_pk_100_nonstandardized} -\title{Small example cross-sectional data set} -\format{ -\subsection{\code{sees_pop_data_pk_100_nonstandardized}}{ - -A \code{pop_data} object (from \code{\link[=as_pop_data]{as_pop_data()}}) with 200 rows and 8 columns: -\describe{ -\item{index_id}{Observation ID} -\item{Country}{Country where the participant was living} -\item{cluster}{survey sampling cluster} -\item{catchment}{survey catchment area} -\item{Age}{participant's age when sampled, in years} -\item{antigen_iso}{which antigen and isotype are being measured -(data is in long format)} -\item{result}{concentration of antigen isotype, in ELISA units} -} -} -} -\source{ -\url{https://osf.io/n6cp3} -} -\usage{ -sees_pop_data_pk_100_nonstandardized -} -\description{ -A subset of data from the SEES data, for examples and testing. -} -\keyword{datasets} diff --git a/man/sees_pop_data_pk_100_standardized.Rd b/man/sees_pop_data_pk_100_standardized.Rd deleted file mode 100644 index 9b31782d..00000000 --- a/man/sees_pop_data_pk_100_standardized.Rd +++ /dev/null @@ -1,32 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/sees_pop_data_pakistan_100.R -\docType{data} -\name{sees_pop_data_pk_100_standardized} -\alias{sees_pop_data_pk_100_standardized} -\title{Small example cross-sectional data set} -\format{ -\subsection{\code{sees_pop_data_pk_100_standardized}}{ - -A \code{pop_data} object (from \code{\link[=as_pop_data]{as_pop_data()}}) with 200 rows and 8 columns: -\describe{ -\item{id}{Observation ID} -\item{Country}{Country where the participant was living} -\item{cluster}{survey sampling cluster} -\item{catchment}{survey catchment area} -\item{age}{participant's age when sampled, in years} -\item{antigen_iso}{which antigen and isotype are being measured -(data is in long format)} -\item{value}{concentration of antigen isotype, in ELISA units} -} -} -} -\source{ -\url{https://osf.io/n6cp3} -} -\usage{ -sees_pop_data_pk_100_standardized -} -\description{ -A subset of data from the SEES data, for examples and testing. -} -\keyword{datasets} From 154fb5eb3360e54727e313ec0d373ba8adb5fd48 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 23:24:03 -0800 Subject: [PATCH 37/61] fixes --- R/check_strata.R | 2 +- man/check_strata.Rd | 2 +- tests/testthat/test-check_strata.R | 4 ++-- tests/testthat/test-est.incidence.R | 6 +++--- tests/testthat/test-est.incidence.by.R | 10 +++++----- tests/testthat/test-log_likelihood.R | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/R/check_strata.R b/R/check_strata.R index 1e347aa6..c193818e 100644 --- a/R/check_strata.R +++ b/R/check_strata.R @@ -3,7 +3,7 @@ #' @param strata a [character] vector #' @returns [NULL], invisibly #' @examples -#' sees_pop_data_pk_100_standardized |> +#' sees_pop_data_pk_100 |> #' check_strata(strata = c("ag", "catch","Count")) #' @dev check_strata <- function(pop_data, strata) { diff --git a/man/check_strata.Rd b/man/check_strata.Rd index 30ce0e44..e78cf040 100644 --- a/man/check_strata.Rd +++ b/man/check_strata.Rd @@ -18,7 +18,7 @@ check_strata(pop_data, strata) Check a \code{pop_data} object for requested strata variables } \examples{ -sees_pop_data_pk_100_standardized |> +sees_pop_data_pk_100 |> check_strata(strata = c("ag", "catch","Count")) } \keyword{internal} diff --git a/tests/testthat/test-check_strata.R b/tests/testthat/test-check_strata.R index b054ef2b..318c4b53 100644 --- a/tests/testthat/test-check_strata.R +++ b/tests/testthat/test-check_strata.R @@ -2,7 +2,7 @@ test_that( "`check_strata()` throws an error when elements that don't exactly match the columns of `pop_data` are provided", { - sees_pop_data_pk_100_standardized |> + sees_pop_data_pk_100 |> check_strata(strata = c("ag", "catch", "Count")) |> expect_error(class = "missing_var") } @@ -10,7 +10,7 @@ test_that( test_that("`check_strata()` throws an error when `strata` is not a `character`", { - sees_pop_data_pk_100_standardized |> + sees_pop_data_pk_100 |> check_strata(strata = c(1,4)) |> expect_error(class = "strata are not strings") }) diff --git a/tests/testthat/test-est.incidence.R b/tests/testthat/test-est.incidence.R index 6d7f75a5..4467d89c 100644 --- a/tests/testthat/test-est.incidence.R +++ b/tests/testthat/test-est.incidence.R @@ -1,6 +1,6 @@ test_that("est.incidence() produces expected results for typhoid data", { typhoid_results <- est.incidence( - pop_data = sees_pop_data_pk_100_standardized, + pop_data = sees_pop_data_pk_100, curve_param = typhoid_curves_nostrat_100, noise_param = example_noise_params_pk, antigen_isos = c("HlyE_IgG", "HlyE_IgA") @@ -16,14 +16,14 @@ test_that( regardless of whether data colnames are standardized.", { est_true <- est.incidence( - pop_data = sees_pop_data_pk_100_standardized, + pop_data = sees_pop_data_pk_100, curve_param = typhoid_curves_nostrat_100, noise_param = example_noise_params_pk, antigen_isos = c("HlyE_IgG", "HlyE_IgA") ) est_false <- est.incidence( - pop_data = sees_pop_data_pk_100_nonstandardized, + pop_data = sees_pop_data_pk_100_old_names, curve_param = typhoid_curves_nostrat_100, noise_param = example_noise_params_pk, antigen_isos = c("HlyE_IgG", "HlyE_IgA") diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index 73bddbd9..7dedd7bd 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -5,7 +5,7 @@ test_that("`est.incidence.by()` warns user when strata is missing", { expect_warning( est.incidence.by( - pop_data = sees_pop_data_pk_100_standardized, + pop_data = sees_pop_data_pk_100, curve_params = typhoid_curves_nostrat_100, noise_params = example_noise_params_pk, antigen_isos = c("HlyE_IgG", "HlyE_IgA") @@ -21,7 +21,7 @@ test_that( expect_error( object = est.incidence.by( strata = c("ag", "catch", "Count"), - pop_data = sees_pop_data_pk_100_standardized, + pop_data = sees_pop_data_pk_100, curve_params = typhoid_curves_nostrat_100, noise_params = example_noise_params_pk, antigen_isos = c("HlyE_IgG", "HlyE_IgA"), @@ -40,7 +40,7 @@ test_that("`est.incidence.by()` produces consistent results for typhoid data", { typhoid_results <- est.incidence.by( strata = "catchment", - pop_data = sees_pop_data_pk_100_standardized, + pop_data = sees_pop_data_pk_100, curve_param = typhoid_curves_nostrat_100, curve_strata_varnames = NULL, noise_strata_varnames = NULL, @@ -61,7 +61,7 @@ test_that( { est_true <- est.incidence.by( strata = c("catchment"), - pop_data = sees_pop_data_pk_100_standardized, + pop_data = sees_pop_data_pk_100, curve_params = typhoid_curves_nostrat_100, noise_params = example_noise_params_pk, antigen_isos = c("HlyE_IgG", "HlyE_IgA"), @@ -72,7 +72,7 @@ test_that( est_false <- est.incidence.by( strata = c("catchment"), - pop_data = sees_pop_data_pk_100_nonstandardized, + pop_data = sees_pop_data_pk_100_old_names, curve_params = typhoid_curves_nostrat_100, noise_params = example_noise_params_pk, curve_strata_varnames = NULL, diff --git a/tests/testthat/test-log_likelihood.R b/tests/testthat/test-log_likelihood.R index ee13399e..0c6cb992 100644 --- a/tests/testthat/test-log_likelihood.R +++ b/tests/testthat/test-log_likelihood.R @@ -2,7 +2,7 @@ test_that("`log_likelihood()` gives consistent results", { # Calculate log-likelihood ll_ag <- log_likelihood( - pop_data = sees_pop_data_pk_100_standardized, + pop_data = sees_pop_data_pk_100, curve_param = typhoid_curves_nostrat_100, noise_param = example_noise_params_pk, antigen_isos = c("HlyE_IgG", "HlyE_IgA"), From 2dcff93e481e8c977a6cce043bb1b87dc7c70b05 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 10:43:05 -0800 Subject: [PATCH 38/61] fix --- .github/workflows/lint-changed-files.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-changed-files.yaml b/.github/workflows/lint-changed-files.yaml index ac6d4022..f5a70aae 100644 --- a/.github/workflows/lint-changed-files.yaml +++ b/.github/workflows/lint-changed-files.yaml @@ -35,7 +35,7 @@ jobs: changed_files <- purrr::map_chr(files, "filename") all_files <- list.files(recursive = TRUE) exclusions_list <- as.list(setdiff(all_files, changed_files)) - lintr::lint_dir(exclusions = exclusions_list) + lintr::lint_package(exclusions = exclusions_list) shell: Rscript {0} env: LINTR_ERROR_ON_LINT: true From f2cce726af6873c86dcd92c0485593967f94a9d6 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 11:07:14 -0800 Subject: [PATCH 39/61] increase snapshot tolerance --- tests/testthat/test-est.incidence.by.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index 7dedd7bd..cfca7223 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -52,7 +52,8 @@ test_that("`est.incidence.by()` produces consistent results for typhoid data", expect_snapshot(x = typhoid_results) - expect_snapshot_value(typhoid_results, style = "deparse") + expect_snapshot_value(typhoid_results, style = "deparse", + tolerance = 1e-4) }) test_that( From 543788fc460e9b2e8f585121fc196460a7f48cdc Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 12:46:35 -0800 Subject: [PATCH 40/61] lint --- R/check_strata.R | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/R/check_strata.R b/R/check_strata.R index c193818e..8e856399 100644 --- a/R/check_strata.R +++ b/R/check_strata.R @@ -4,39 +4,46 @@ #' @returns [NULL], invisibly #' @examples #' sees_pop_data_pk_100 |> -#' check_strata(strata = c("ag", "catch","Count")) +#' check_strata(strata = c("ag", "catch", "Count")) #' @dev check_strata <- function(pop_data, strata) { if (!is.character(strata)) { cli::cli_abort( class = "strata are not strings", - c("x" = "Argument `strata` is not a character vector.", "i" = "Provide a character vector with names of stratifying variables.") + message = c( + "x" = "Argument `strata` is not a character vector.", + "i" = "Provide a character vector with names of stratifying variables." + ) ) } - present_strata_vars = intersect(strata, names(pop_data)) - missing_strata_vars = setdiff(strata, present_strata_vars) + present_strata_vars <- intersect(strata, names(pop_data)) + missing_strata_vars <- setdiff(strata, present_strata_vars) if (length(missing_strata_vars) > 0) { - message0 = c("Can't stratify provided {.arg pop_data} with the provided {.arg strata}:", - "i" = "variable {.var {missing_strata_vars}} {?is/are} missing in {.arg pop_data}.") + message0 <- c( + "Can't stratify provided {.arg pop_data} + with the provided {.arg strata}:", + "i" = "variable {.var {missing_strata_vars}} + {?is/are} missing in {.arg pop_data}." + ) - partial_matches = - purrr::map(missing_strata_vars, function(x) + partial_matches <- + purrr::map(missing_strata_vars, function(x) { stringr::str_subset(string = names(pop_data), pattern = x) %>% glue::backtick() %>% - and::or()) %>% + and::or() + }) %>% rlang::set_names(missing_strata_vars) %>% - purrr::keep( ~ length(.x) > 0) + purrr::keep(~ length(.x) > 0) - inputs_with_partial_matches = names(partial_matches) + inputs_with_partial_matches <- names(partial_matches) # nolint: object_usage_linter - if (length(partial_matches) > 0) - { - partial_matches = + if (length(partial_matches) > 0) { + partial_matches <- glue::glue("\"{names(partial_matches)}\": {partial_matches}") - message0 = c( + message0 <- c( message0, "i" = "The following input{?s} to {.arg strata} might be misspelled: @@ -44,7 +51,6 @@ check_strata <- function(pop_data, strata) { "i" = "Did you mean:", partial_matches %>% rlang::set_names("*") ) - } cli::cli_abort( @@ -52,7 +58,6 @@ check_strata <- function(pop_data, strata) { call = rlang::caller_env(), message = message0 ) - } invisible(NULL) From 3682fac2ae13268720554f66b716e91de3b41305 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 12:49:25 -0800 Subject: [PATCH 41/61] document --- man/check_strata.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/check_strata.Rd b/man/check_strata.Rd index e78cf040..f7fe767f 100644 --- a/man/check_strata.Rd +++ b/man/check_strata.Rd @@ -19,6 +19,6 @@ Check a \code{pop_data} object for requested strata variables } \examples{ sees_pop_data_pk_100 |> - check_strata(strata = c("ag", "catch","Count")) + check_strata(strata = c("ag", "catch", "Count")) } \keyword{internal} From 7ad67e7b4ab9404a48c6e143422931aba982b7e5 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 12:50:19 -0800 Subject: [PATCH 42/61] Increment version number to 1.2.0.9022 --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9b2b5b1b..6b5dd1e1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: serocalculator Title: Estimating Infection Rates from Serological Data -Version: 1.2.0.9021 +Version: 1.2.0.9022 Authors@R: c( person("Peter", "Teunis", , "p.teunis@emory.edu", role = c("aut", "cph"), comment = "Author of the method and original code."), diff --git a/NEWS.md b/NEWS.md index 38fba635..6e5134f0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# serocalculator 1.3.0 +# serocalculator (development version) ## New features From d8385bb83eff6ce97e68b8af6d51646f5b55fb93 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 12:50:37 -0800 Subject: [PATCH 43/61] remove duplicate line --- NEWS.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 6e5134f0..dc89a64c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,8 +4,6 @@ * Added example datasets with documentation for examples and testing (#314) -* Added example datasets with documentation for examples and testing (#314) - * Improved error messaging for `autoplot.pop_data()` (#234). * Clarified package installation instructions in scrub typhus vignette (#234). From c0175710f982489eb8345495b75d6a9a8f37aa79 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 15:13:23 -0800 Subject: [PATCH 44/61] try to fix lint --- .github/workflows/lint-changed-files.yaml | 3 +++ R/check_strata.R | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint-changed-files.yaml b/.github/workflows/lint-changed-files.yaml index f5a70aae..5fbd6b4a 100644 --- a/.github/workflows/lint-changed-files.yaml +++ b/.github/workflows/lint-changed-files.yaml @@ -29,6 +29,9 @@ jobs: cat('\noptions(lintr.linter_file = ".lintr")\n', file = "~/.Rprofile", append = TRUE) shell: Rscript {0} + - name: Install package + run: R CMD INSTALL . + - name: Extract and lint files changed by this PR run: | files <- gh::gh("GET https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files") diff --git a/R/check_strata.R b/R/check_strata.R index 8e856399..068ae1e4 100644 --- a/R/check_strata.R +++ b/R/check_strata.R @@ -30,11 +30,11 @@ check_strata <- function(pop_data, strata) { partial_matches <- purrr::map(missing_strata_vars, function(x) { - stringr::str_subset(string = names(pop_data), pattern = x) %>% - glue::backtick() %>% + stringr::str_subset(string = names(pop_data), pattern = x) |> + glue::backtick() |> and::or() - }) %>% - rlang::set_names(missing_strata_vars) %>% + }) |> + rlang::set_names(missing_strata_vars) |> purrr::keep(~ length(.x) > 0) inputs_with_partial_matches <- names(partial_matches) # nolint: object_usage_linter @@ -49,7 +49,7 @@ check_strata <- function(pop_data, strata) { might be misspelled: {.str {inputs_with_partial_matches}}", "i" = "Did you mean:", - partial_matches %>% rlang::set_names("*") + partial_matches |> rlang::set_names("*") ) } From 201853d8b1a1ad044a16934fafa0e89d3d08b506 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 15:51:14 -0800 Subject: [PATCH 45/61] more linting --- R/est.incidence.by.R | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index 1d49e899..e0fb7fce 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -127,7 +127,7 @@ est.incidence.by <- function( ) # Split data per stratum - stratumDataList <- stratify_data( + stratum_data_list <- stratify_data( antigen_isos = antigen_isos, data = pop_data %>% filter(.data$antigen_iso %in% antigen_isos), curve_params = curve_params %>% filter(.data$antigen_iso %in% antigen_isos), @@ -137,7 +137,7 @@ est.incidence.by <- function( noise_strata_varnames = noise_strata_varnames ) - strata_table <- stratumDataList %>% attr("strata") + strata_table <- stratum_data_list %>% attr("strata") if (verbose) { cli::cli_inform("Data has been stratified.") @@ -165,7 +165,7 @@ est.incidence.by <- function( `num_cores` = ", num_cores, ".") } - libPaths <- .libPaths() + lib_paths <- .libPaths() cl <- num_cores %>% parallel::makeCluster() %>% @@ -179,7 +179,7 @@ est.incidence.by <- function( # Evaluate library loading on the cluster parallel::clusterEvalQ(cl, { - .libPaths(libPaths) + .libPaths(lib_paths) # note - this gets out of sync when using load_all() in development require(serocalculator) require(dplyr) @@ -189,7 +189,7 @@ est.incidence.by <- function( time <- system.time({ fits <- parallel::parLapplyLB( cl = cl, - X = stratumDataList, + X = stratum_data_list, fun = function(x) { do.call( what = est.incidence, @@ -217,7 +217,7 @@ est.incidence.by <- function( fits <- list() # Initialize an empty list for fits # Time progress - for (cur_stratum in names(stratumDataList)) { + for (cur_stratum in names(stratum_data_list)) { cur_stratum_vars <- strata_table %>% dplyr::filter(.data$Stratum == cur_stratum) @@ -229,7 +229,7 @@ est.incidence.by <- function( fits[[cur_stratum]] <- do.call( what = est.incidence, args = c( - stratumDataList[[cur_stratum]], + stratum_data_list[[cur_stratum]], list( lambda_start = lambda_start, antigen_isos = antigen_isos, @@ -249,7 +249,7 @@ est.incidence.by <- function( } } - incidenceData <- structure( + incidence_data <- structure( fits, antigen_isos = antigen_isos, Strata = strata_table, @@ -257,5 +257,5 @@ est.incidence.by <- function( class = "seroincidence.by" %>% union(class(fits)) ) - return(incidenceData) + return(incidence_data) } From 266bae15b9a41c577ba380399308c716a5577968 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 16:01:14 -0800 Subject: [PATCH 46/61] lint --- tests/testthat/test-check_strata.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-check_strata.R b/tests/testthat/test-check_strata.R index 318c4b53..ec051cf7 100644 --- a/tests/testthat/test-check_strata.R +++ b/tests/testthat/test-check_strata.R @@ -11,6 +11,6 @@ test_that( test_that("`check_strata()` throws an error when `strata` is not a `character`", { sees_pop_data_pk_100 |> - check_strata(strata = c(1,4)) |> + check_strata(strata = c(1, 4)) |> expect_error(class = "strata are not strings") }) From 2587245ea0e2a9ac49b2b3c51ecae83f9f9ac77a Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 16:13:14 -0800 Subject: [PATCH 47/61] new test to hopefully complete patch coverage --- R/est.incidence.by.R | 2 +- serocalculator.Rproj | 1 + tests/testthat/test-est.incidence.by.R | 35 +++++++++++++++++++++++--- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index e0fb7fce..24ab0714 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -175,7 +175,7 @@ est.incidence.by <- function( }) # Export library paths to the cluster - parallel::clusterExport(cl, c("libPaths"), envir = environment()) + parallel::clusterExport(cl, "lib_paths", envir = environment()) # Evaluate library loading on the cluster parallel::clusterEvalQ(cl, { diff --git a/serocalculator.Rproj b/serocalculator.Rproj index e132a2f2..137104ba 100644 --- a/serocalculator.Rproj +++ b/serocalculator.Rproj @@ -1,4 +1,5 @@ Version: 1.0 +ProjectId: 4f3b7963-3b75-49a0-9c45-4956f19ff2f2 RestoreWorkspace: No SaveWorkspace: No diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index cfca7223..5e6522b2 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -1,7 +1,3 @@ - - - - test_that("`est.incidence.by()` warns user when strata is missing", { expect_warning( est.incidence.by( @@ -85,3 +81,34 @@ test_that( expect_equal(est_true, est_false) } ) + + +test_that( + "`est.incidence.by()` produces expected results + regardless of whether using parallel processing or not.", + { + ests_1_core <- est.incidence.by( + strata = c("catchment"), + pop_data = sees_pop_data_pk_100, + curve_params = typhoid_curves_nostrat_100, + noise_params = example_noise_params_pk, + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + curve_strata_varnames = NULL, + noise_strata_varnames = NULL, + num_cores = 1 + ) + + ests_2_cores <- est.incidence.by( + strata = c("catchment"), + pop_data = sees_pop_data_pk_100_old_names, + curve_params = typhoid_curves_nostrat_100, + noise_params = example_noise_params_pk, + curve_strata_varnames = NULL, + noise_strata_varnames = NULL, + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + num_cores = 2 + ) + + expect_equal(ests_1_core, ests_2_cores) + } +) From c3dfcbdf3b142d3044d46e042cd5deb7ad0042e3 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 16:15:09 -0800 Subject: [PATCH 48/61] skip parallel cores test if only one core available --- tests/testthat/test-est.incidence.by.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index 5e6522b2..e9bf4193 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -87,6 +87,8 @@ test_that( "`est.incidence.by()` produces expected results regardless of whether using parallel processing or not.", { + + skip_if(parallel::detectCores() == 1) ests_1_core <- est.incidence.by( strata = c("catchment"), pop_data = sees_pop_data_pk_100, From 6fba6a8c243db8f08f3c21d69dd08f434c7c274d Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 16:22:54 -0800 Subject: [PATCH 49/61] added test of verbose output --- R/est.incidence.by.R | 9 ++++---- tests/testthat/test-est.incidence.by.R | 31 ++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index 24ab0714..a678adbc 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -161,8 +161,8 @@ est.incidence.by <- function( num_cores <- num_cores %>% check_parallel_cores() if (verbose) { - message("Setting up parallel processing with - `num_cores` = ", num_cores, ".") + cli::cli_inform("Setting up parallel processing with + `num_cores` = {num_cores}.") } lib_paths <- .libPaths() @@ -210,8 +210,7 @@ est.incidence.by <- function( }) if (verbose) { - message("Elapsed time for parallelized code: ") - print(time) + cli::cli_inform("Elapsed time for parallelized code: {time}") } } else { fits <- list() # Initialize an empty list for fits @@ -222,7 +221,7 @@ est.incidence.by <- function( dplyr::filter(.data$Stratum == cur_stratum) if (verbose) { - message("starting new stratum: ", cur_stratum) + cli::cli_inform("starting new stratum: {cur_stratum}") print(cur_stratum_vars) } diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index e9bf4193..43b410a1 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -114,3 +114,34 @@ test_that( expect_equal(ests_1_core, ests_2_cores) } ) + +test_that( + "`est.incidence.by()` produces expected results + regardless of whether using verbose messaging or not.", + { + + ests_verbose <- est.incidence.by( + strata = c("catchment"), + pop_data = sees_pop_data_pk_100, + curve_params = typhoid_curves_nostrat_100, + noise_params = example_noise_params_pk, + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + curve_strata_varnames = NULL, + noise_strata_varnames = NULL, + verbose = TRUE + ) + + ests_non_verbose <- est.incidence.by( + verbose = FALSE, + strata = c("catchment"), + pop_data = sees_pop_data_pk_100_old_names, + curve_params = typhoid_curves_nostrat_100, + noise_params = example_noise_params_pk, + curve_strata_varnames = NULL, + noise_strata_varnames = NULL, + antigen_isos = c("HlyE_IgG", "HlyE_IgA") + ) + + expect_equal(ests_verbose, ests_non_verbose) + } +) From 2e395ad96c433a675d31773e2de9381c771dce40 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 16:28:09 -0800 Subject: [PATCH 50/61] cleanup --- R/est.incidence.by.R | 64 ++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index a678adbc..dab1cc15 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -140,9 +140,12 @@ est.incidence.by <- function( strata_table <- stratum_data_list %>% attr("strata") if (verbose) { - cli::cli_inform("Data has been stratified.") - cli::cli_inform("Here are the strata that will be analyzed:") - print(strata_table) + cli::cli_inform( + c( + "i" = "Data has been stratified.", + "i" = "Here are the strata that will be analyzed:", + ""), + body = strata_table |> capture.output()) } if (num_cores > 1L && !requireNamespace("parallel", quietly = TRUE)) { @@ -213,40 +216,43 @@ est.incidence.by <- function( cli::cli_inform("Elapsed time for parallelized code: {time}") } } else { - fits <- list() # Initialize an empty list for fits - # Time progress - for (cur_stratum in names(stratum_data_list)) { - cur_stratum_vars <- strata_table %>% - dplyr::filter(.data$Stratum == cur_stratum) + # Time progress: + time <- system.time({ + + fits <- list() # Initialize an empty list for fits - if (verbose) { - cli::cli_inform("starting new stratum: {cur_stratum}") - print(cur_stratum_vars) - } + for (cur_stratum in names(stratum_data_list)) { + cur_stratum_vars <- strata_table %>% + dplyr::filter(.data$Stratum == cur_stratum) - fits[[cur_stratum]] <- do.call( - what = est.incidence, - args = c( - stratum_data_list[[cur_stratum]], - list( - lambda_start = lambda_start, - antigen_isos = antigen_isos, - build_graph = build_graph, - print_graph = print_graph, - verbose = verbose, - ... + if (verbose) { + cli::cli_inform("starting new stratum: {cur_stratum}") + print(cur_stratum_vars) + } + + fits[[cur_stratum]] <- do.call( + what = est.incidence, + args = c( + stratum_data_list[[cur_stratum]], + list( + lambda_start = lambda_start, + antigen_isos = antigen_isos, + build_graph = build_graph, + print_graph = print_graph, + verbose = verbose, + ... + ) ) ) - ) - } + } + }) if (verbose) { - message("Elapsed time for loop over strata: ") - print(time) + cli::cli_inform("Elapsed time for loop over strata: {time}") + } } - } incidence_data <- structure( fits, @@ -257,4 +263,4 @@ est.incidence.by <- function( ) return(incidence_data) -} + } From 491cda6511a562367d7cee72d8edeea964120ef4 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 16:34:59 -0800 Subject: [PATCH 51/61] test verbose and multicore --- tests/testthat/test-est.incidence.by.R | 35 +++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index 43b410a1..11650e18 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -88,7 +88,6 @@ test_that( regardless of whether using parallel processing or not.", { - skip_if(parallel::detectCores() == 1) ests_1_core <- est.incidence.by( strata = c("catchment"), pop_data = sees_pop_data_pk_100, @@ -145,3 +144,37 @@ test_that( expect_equal(ests_verbose, ests_non_verbose) } ) + +test_that( + "`est.incidence.by()` produces expected results + regardless of whether using verbose messaging or not + with multi-core processing.", + { + + ests_verbose_mc <- est.incidence.by( + strata = c("catchment"), + pop_data = sees_pop_data_pk_100, + curve_params = typhoid_curves_nostrat_100, + noise_params = example_noise_params_pk, + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + curve_strata_varnames = NULL, + noise_strata_varnames = NULL, + verbose = TRUE, + num_cores = 2 + ) + + ests_non_verbose_mc <- est.incidence.by( + verbose = FALSE, + strata = c("catchment"), + pop_data = sees_pop_data_pk_100_old_names, + curve_params = typhoid_curves_nostrat_100, + noise_params = example_noise_params_pk, + curve_strata_varnames = NULL, + noise_strata_varnames = NULL, + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + num_cores = 2 + ) + + expect_equal(ests_verbose_mc, ests_non_verbose_mc) + } +) From 8742288022ff303cbc88a3c9e0c4b43280e90f4b Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 16:37:25 -0800 Subject: [PATCH 52/61] more checks --- tests/testthat/test-est.incidence.by.R | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/testthat/test-est.incidence.by.R b/tests/testthat/test-est.incidence.by.R index 11650e18..b2c2f64e 100644 --- a/tests/testthat/test-est.incidence.by.R +++ b/tests/testthat/test-est.incidence.by.R @@ -116,10 +116,11 @@ test_that( test_that( "`est.incidence.by()` produces expected results - regardless of whether using verbose messaging or not.", + regardless of whether using verbose messaging or not. + with single core.", { - ests_verbose <- est.incidence.by( + ests_verbose_sc <- est.incidence.by( strata = c("catchment"), pop_data = sees_pop_data_pk_100, curve_params = typhoid_curves_nostrat_100, @@ -127,10 +128,11 @@ test_that( antigen_isos = c("HlyE_IgG", "HlyE_IgA"), curve_strata_varnames = NULL, noise_strata_varnames = NULL, - verbose = TRUE + verbose = TRUE, + num_cores = 1 ) - ests_non_verbose <- est.incidence.by( + ests_non_verbose_sc <- est.incidence.by( verbose = FALSE, strata = c("catchment"), pop_data = sees_pop_data_pk_100_old_names, @@ -138,10 +140,11 @@ test_that( noise_params = example_noise_params_pk, curve_strata_varnames = NULL, noise_strata_varnames = NULL, - antigen_isos = c("HlyE_IgG", "HlyE_IgA") + antigen_isos = c("HlyE_IgG", "HlyE_IgA"), + num_cores = 1 ) - expect_equal(ests_verbose, ests_non_verbose) + expect_equal(ests_verbose_sc, ests_non_verbose_sc) } ) @@ -178,3 +181,7 @@ test_that( expect_equal(ests_verbose_mc, ests_non_verbose_mc) } ) + +# note: no need to check multi-core verbose vs single-core, nonverbose, +# or the other diagonal, because of transitive equality and the three checks +# made above From 23a8baa2e2944435f7e4c2d434f71c0af835c351 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 16:47:21 -0800 Subject: [PATCH 53/61] cleaning up time output --- R/est.incidence.by.R | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index dab1cc15..fb8a7cc9 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -213,7 +213,8 @@ est.incidence.by <- function( }) if (verbose) { - cli::cli_inform("Elapsed time for parallelized code: {time}") + cli::cli_inform(c("i" = "Elapsed time for parallelized code:"), + body = capture.output(time)) } } else { @@ -250,9 +251,11 @@ est.incidence.by <- function( }) if (verbose) { - cli::cli_inform("Elapsed time for loop over strata: {time}") - } + cli::cli_inform( + c("i" = "Elapsed time for loop over strata: "), + body = capture.output(time)) } + } incidence_data <- structure( fits, @@ -263,4 +266,4 @@ est.incidence.by <- function( ) return(incidence_data) - } +} From 5c98bd547ac2418b3ab3a0da42c949e0a918cf2c Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 22:28:06 -0800 Subject: [PATCH 54/61] fixes --- R/est.incidence.by.R | 19 ++++++++++--------- R/example_typhoid_curves_nostrat.R | 1 - 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index fb8a7cc9..412b0f47 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -50,7 +50,7 @@ #' #' curve <- load_curve_params("https://osf.io/download/rtw5k/") %>% #' filter(antigen_iso %in% c("HlyE_IgA", "HlyE_IgG")) %>% -#' # Reduce dataset for the purposes of this example +#' # Reduce dataset for the purposes of this example #' slice(1:100, .by = antigen_iso) #' #' noise <- load_noise_params("https://osf.io/download//hqy4v/") @@ -144,8 +144,10 @@ est.incidence.by <- function( c( "i" = "Data has been stratified.", "i" = "Here are the strata that will be analyzed:", - ""), - body = strata_table |> capture.output()) + "" + ), + body = strata_table |> capture.output() + ) } if (num_cores > 1L && !requireNamespace("parallel", quietly = TRUE)) { @@ -214,14 +216,13 @@ est.incidence.by <- function( if (verbose) { cli::cli_inform(c("i" = "Elapsed time for parallelized code:"), - body = capture.output(time)) + body = capture.output(time) + ) } } else { - # Time progress: time <- system.time({ - - fits <- list() # Initialize an empty list for fits + fits <- list() # Initialize an empty list for fits for (cur_stratum in names(stratum_data_list)) { cur_stratum_vars <- strata_table %>% @@ -247,13 +248,13 @@ est.incidence.by <- function( ) ) } - }) if (verbose) { cli::cli_inform( c("i" = "Elapsed time for loop over strata: "), - body = capture.output(time)) + body = capture.output(time) + ) } } diff --git a/R/example_typhoid_curves_nostrat.R b/R/example_typhoid_curves_nostrat.R index 57598806..3d77103a 100644 --- a/R/example_typhoid_curves_nostrat.R +++ b/R/example_typhoid_curves_nostrat.R @@ -17,4 +17,3 @@ #' } #' @source "typhoid_curves_nostrat_100" -"typhoid_curves_nostrat_100" From 1a73533b33093406cc8597f357b72d915fb14f8f Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 22:30:56 -0800 Subject: [PATCH 55/61] formatting --- man/est.incidence.by.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/est.incidence.by.Rd b/man/est.incidence.by.Rd index a0653c19..33637c21 100644 --- a/man/est.incidence.by.Rd +++ b/man/est.incidence.by.Rd @@ -136,7 +136,7 @@ xs_data <- load_pop_data("https://osf.io/download//n6cp3/") curve <- load_curve_params("https://osf.io/download/rtw5k/") \%>\% filter(antigen_iso \%in\% c("HlyE_IgA", "HlyE_IgG")) \%>\% - # Reduce dataset for the purposes of this example + # Reduce dataset for the purposes of this example slice(1:100, .by = antigen_iso) noise <- load_noise_params("https://osf.io/download//hqy4v/") From cf0070be46a7f11bde80f15f3e2216897e8b7b08 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Wed, 6 Nov 2024 13:13:48 +0300 Subject: [PATCH 56/61] Update R/est.incidence.by.R Co-authored-by: Douglas Ezra Morrison --- R/est.incidence.by.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index 6e2815e6..7eb808ed 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -50,7 +50,7 @@ #' #' curve <- load_curve_params("https://osf.io/download/rtw5k/") %>% #' filter(antigen_iso %in% c("HlyE_IgA", "HlyE_IgG")) %>% -#' # Reduce dataset for the purposes of this example +#' # Reduce dataset for the purposes of this example: #' slice(1:100, .by = antigen_iso) #' #' noise <- load_noise_params("https://osf.io/download//hqy4v/") From 33dc19178b3f599b43524aefb7f823e19aac134d Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Wed, 6 Nov 2024 13:13:57 +0300 Subject: [PATCH 57/61] Update R/est.incidence.by.R Co-authored-by: Douglas Ezra Morrison --- R/est.incidence.by.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/est.incidence.by.R b/R/est.incidence.by.R index 7eb808ed..e3c9020e 100644 --- a/R/est.incidence.by.R +++ b/R/est.incidence.by.R @@ -35,8 +35,8 @@ #' #' @return #' * if `strata` has meaningful inputs: -#' An object of class `"seroincidence.by"`; i.e., a list of ` -#' "seroincidence"` objects from [est.incidence()], one for each stratum, +#' An object of class `"seroincidence.by"`; i.e., a list of +#' `"seroincidence"` objects from [est.incidence()], one for each stratum, #' with some meta-data attributes. #' * if `strata` is missing, `NULL`, `NA`, or `""`: #' An object of class `"seroincidence"`. From 177d334ca83e06eeac19a7be2d511ed6a5d21e7d Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Wed, 6 Nov 2024 16:18:48 +0300 Subject: [PATCH 58/61] change version number --- DESCRIPTION | 4 ---- 1 file changed, 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 982f7286..047faad8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,7 @@ Type: Package Package: serocalculator Title: Estimating Infection Rates from Serological Data -<<<<<<< HEAD -Version: 1.2.0.9019 -======= Version: 1.2.0.9021 ->>>>>>> ae4fc68610d97447afdae8cb5134c96d2de0a526 Authors@R: c( person("Peter", "Teunis", , "p.teunis@emory.edu", role = c("aut", "cph"), comment = "Author of the method and original code."), From f953b3b08991bd4650aeb3fae47e4a81f1049326 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Wed, 6 Nov 2024 20:35:10 +0300 Subject: [PATCH 59/61] make changes to NEWS.md --- NEWS.md | 2 -- man/est.incidence.by.Rd | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index ea079f29..5fff4656 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,5 @@ # serocalculator (development version) -# serocalculator 1.3.0 - ## New features * Add test for missing strata in `est.incidence.by` (#227) diff --git a/man/est.incidence.by.Rd b/man/est.incidence.by.Rd index a0653c19..86f71d87 100644 --- a/man/est.incidence.by.Rd +++ b/man/est.incidence.by.Rd @@ -108,7 +108,8 @@ then the computations are executed in parallel. Default = 1L.} \value{ \itemize{ \item if \code{strata} has meaningful inputs: -An object of class \code{"seroincidence.by"}; i.e., a list of \code{ "seroincidence"} objects from \code{\link[=est.incidence]{est.incidence()}}, one for each stratum, +An object of class \code{"seroincidence.by"}; i.e., a list of +\code{"seroincidence"} objects from \code{\link[=est.incidence]{est.incidence()}}, one for each stratum, with some meta-data attributes. \item if \code{strata} is missing, \code{NULL}, \code{NA}, or \code{""}: An object of class \code{"seroincidence"}. @@ -136,7 +137,7 @@ xs_data <- load_pop_data("https://osf.io/download//n6cp3/") curve <- load_curve_params("https://osf.io/download/rtw5k/") \%>\% filter(antigen_iso \%in\% c("HlyE_IgA", "HlyE_IgG")) \%>\% - # Reduce dataset for the purposes of this example + # Reduce dataset for the purposes of this example: slice(1:100, .by = antigen_iso) noise <- load_noise_params("https://osf.io/download//hqy4v/") From 8dc73c8156be4af260efae883843e0c64ad71900 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Wed, 6 Nov 2024 20:55:43 +0300 Subject: [PATCH 60/61] Increment version number to 1.2.0.9022 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 047faad8..ff4cad91 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: serocalculator Title: Estimating Infection Rates from Serological Data -Version: 1.2.0.9021 +Version: 1.2.0.9022 Authors@R: c( person("Peter", "Teunis", , "p.teunis@emory.edu", role = c("aut", "cph"), comment = "Author of the method and original code."), From 4e2b8e91f39e5d8f5e9fc00b4bd1f76a36ff40c3 Mon Sep 17 00:00:00 2001 From: Chris Orwa Date: Thu, 7 Nov 2024 22:56:02 +0300 Subject: [PATCH 61/61] make changes --- serocalculator.Rproj | 1 - 1 file changed, 1 deletion(-) diff --git a/serocalculator.Rproj b/serocalculator.Rproj index 137104ba..e132a2f2 100644 --- a/serocalculator.Rproj +++ b/serocalculator.Rproj @@ -1,5 +1,4 @@ Version: 1.0 -ProjectId: 4f3b7963-3b75-49a0-9c45-4956f19ff2f2 RestoreWorkspace: No SaveWorkspace: No