11test_that(
2- desc = " estimate_scr_by () warns about missing data" ,
2+ desc = " est_seroincidence_by () warns about missing data" ,
33 code = {
44
55 withr :: local_package(" dplyr" )
66 withr :: local_package(" readr" )
77
8- estimate_scr_by (
8+ est_seroincidence_by (
99 pop_data =
1010 sees_pop_data_pk_100 | >
1111 dplyr :: filter(catchment == " kgh" | antigen_iso == " HlyE_IgA" ),
@@ -22,13 +22,13 @@ test_that(
2222)
2323
2424
25- test_that(" estimate_scr_by () warns about missing data" , {
25+ test_that(" est_seroincidence_by () warns about missing data" , {
2626
2727 withr :: local_package(" dplyr" )
2828 withr :: local_package(" readr" )
2929
3030
31- estimate_scr_by (
31+ est_seroincidence_by (
3232 pop_data = sees_pop_data_pk_100 | >
3333 tail(- 1 ),
3434 curve_params = typhoid_curves_nostrat_100 ,
@@ -41,9 +41,9 @@ test_that("estimate_scr_by() warns about missing data", {
4141 expect_warning(class = " incomplete-obs" )
4242})
4343
44- test_that(" `estimate_scr_by ()` warns user when strata is missing" , {
44+ test_that(" `est_seroincidence_by ()` warns user when strata is missing" , {
4545 expect_warning(
46- estimate_scr_by (
46+ est_seroincidence_by (
4747 pop_data = sees_pop_data_pk_100 ,
4848 curve_params = typhoid_curves_nostrat_100 ,
4949 noise_params = example_noise_params_pk ,
@@ -54,11 +54,11 @@ test_that("`estimate_scr_by()` warns user when strata is missing", {
5454})
5555
5656test_that(
57- " `estimate_scr_by ()` aborts when elements that don't exactly
57+ " `est_seroincidence_by ()` aborts when elements that don't exactly
5858 match the columns of `pop_data` are provided" ,
5959 {
6060 expect_error(
61- object = estimate_scr_by (
61+ object = est_seroincidence_by (
6262 strata = c(" ag" , " catch" , " Count" ),
6363 pop_data = sees_pop_data_pk_100 ,
6464 curve_params = typhoid_curves_nostrat_100 ,
@@ -76,10 +76,10 @@ test_that(
7676
7777
7878test_that(
79- desc = " `estimate_scr_by ()` produces consistent results for typhoid data" ,
79+ desc = " `est_seroincidence_by ()` produces consistent results for typhoid data" ,
8080 code = {
8181 withr :: local_options(width = 80 )
82- typhoid_results <- estimate_scr_by (
82+ typhoid_results <- est_seroincidence_by (
8383 strata = " catchment" ,
8484 pop_data = sees_pop_data_pk_100 ,
8585 curve_param = typhoid_curves_nostrat_100 ,
@@ -99,10 +99,10 @@ test_that(
9999)
100100
101101test_that(
102- " `estimate_scr_by ()` produces expected results
102+ " `est_seroincidence_by ()` produces expected results
103103 regardless of whether varnames have been standardized." ,
104104 {
105- est_true <- estimate_scr_by (
105+ est_true <- est_seroincidence_by (
106106 strata = c(" catchment" ),
107107 pop_data = sees_pop_data_pk_100 ,
108108 curve_params = typhoid_curves_nostrat_100 ,
@@ -113,7 +113,7 @@ test_that(
113113 num_cores = 1 # Allow for parallel processing to decrease run time
114114 )
115115
116- est_false <- estimate_scr_by (
116+ est_false <- est_seroincidence_by (
117117 strata = c(" catchment" ),
118118 pop_data = sees_pop_data_pk_100_old_names ,
119119 curve_params = typhoid_curves_nostrat_100 ,
@@ -130,11 +130,11 @@ test_that(
130130
131131
132132test_that(
133- " `estimate_scr_by ()` produces expected results
133+ " `est_seroincidence_by ()` produces expected results
134134 regardless of whether using parallel processing or not." ,
135135 {
136136
137- ests_1_core <- estimate_scr_by (
137+ ests_1_core <- est_seroincidence_by (
138138 strata = c(" catchment" ),
139139 pop_data = sees_pop_data_pk_100 ,
140140 curve_params = typhoid_curves_nostrat_100 ,
@@ -145,7 +145,7 @@ test_that(
145145 num_cores = 1
146146 )
147147
148- ests_2_cores <- estimate_scr_by (
148+ ests_2_cores <- est_seroincidence_by (
149149 strata = c(" catchment" ),
150150 pop_data = sees_pop_data_pk_100_old_names ,
151151 curve_params = typhoid_curves_nostrat_100 ,
@@ -161,15 +161,15 @@ test_that(
161161)
162162
163163test_that(
164- " `estimate_scr_by ()` produces expected results
164+ " `est_seroincidence_by ()` produces expected results
165165 regardless of whether using verbose messaging or not.
166166 with single core." ,
167167 {
168168
169169 capture.output(
170170 file = nullfile(),
171171 {
172- ests_verbose_sc <- estimate_scr_by (
172+ ests_verbose_sc <- est_seroincidence_by (
173173 strata = c(" catchment" ),
174174 pop_data = sees_pop_data_pk_100 ,
175175 curve_params = typhoid_curves_nostrat_100 ,
@@ -183,7 +183,7 @@ test_that(
183183 }
184184 )
185185
186- ests_non_verbose_sc <- estimate_scr_by (
186+ ests_non_verbose_sc <- est_seroincidence_by (
187187 verbose = FALSE ,
188188 strata = c(" catchment" ),
189189 pop_data = sees_pop_data_pk_100_old_names ,
@@ -200,12 +200,12 @@ test_that(
200200)
201201
202202test_that(
203- " `estimate_scr_by ()` produces expected results
203+ " `est_seroincidence_by ()` produces expected results
204204 regardless of whether using verbose messaging or not
205205 with multi-core processing." ,
206206 {
207207
208- ests_verbose_mc <- estimate_scr_by (
208+ ests_verbose_mc <- est_seroincidence_by (
209209 strata = c(" catchment" ),
210210 pop_data = sees_pop_data_pk_100 ,
211211 curve_params = typhoid_curves_nostrat_100 ,
@@ -218,7 +218,7 @@ test_that(
218218 ) | >
219219 suppressMessages()
220220
221- ests_non_verbose_mc <- estimate_scr_by (
221+ ests_non_verbose_mc <- est_seroincidence_by (
222222 verbose = FALSE ,
223223 strata = c(" catchment" ),
224224 pop_data = sees_pop_data_pk_100_old_names ,
@@ -241,7 +241,7 @@ test_that(
241241test_that(
242242 " a warning is produced when `strata = NULL" ,
243243 code = {
244- estimate_scr_by (
244+ est_seroincidence_by (
245245 strata = NULL ,
246246 pop_data = sees_pop_data_pk_100 ,
247247 curve_param = typhoid_curves_nostrat_100 ,
@@ -260,7 +260,7 @@ test_that("results are consistent with `strata = NULL`", {
260260 antigen_isos = c(" HlyE_IgG" , " HlyE_IgA" )
261261 )
262262
263- typhoid_results_nullstrata <- estimate_scr_by (
263+ typhoid_results_nullstrata <- est_seroincidence_by (
264264 strata = NULL ,
265265 pop_data = sees_pop_data_pk_100 ,
266266 curve_param = typhoid_curves_nostrat_100 ,
0 commit comments