Skip to content

Commit caf8016

Browse files
committed
Merge branch 'correlated-biomarkers-qmd' of https://github.com/UCD-SERG/serodynamics into correlated-biomarkers-qmd
2 parents 7d533de + 20bea35 commit caf8016

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

R/sim_case_data.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ sim_case_data <- function(
7070
"iter"
7171
)
7272
) |>
73-
rowwise() |>
7473
mutate(
7574
value = ab(
7675
t = .data$obs_time,
@@ -80,8 +79,7 @@ sim_case_data <- function(
8079
alpha = .data$alpha,
8180
shape = .data$r
8281
)
83-
) |>
84-
ungroup()
82+
)
8583

8684
to_return <-
8785
biomarker_level_data |>

tests/testthat/test-run_mod.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
test_that(
22
desc = "results are consistent with simulated data",
33
code = {
4+
testthat::announce_snapshot_file("sim-strat-curve-params.csv")
5+
testthat::announce_snapshot_file("sim-strat-fitted_residuals.csv")
46
skip_on_os(c("windows", "linux"))
57
withr::local_seed(1)
68
strat1 <- serocalculator::typhoid_curves_nostrat_100 |>
@@ -48,6 +50,8 @@ test_that(
4850
test_that(
4951
desc = "results are consistent with SEES data",
5052
code = {
53+
testthat::announce_snapshot_file("strat-curve-params.csv")
54+
testthat::announce_snapshot_file("strat-fitted_residuals.csv")
5155
skip_on_os(c("windows", "linux"))
5256
withr::local_seed(1)
5357
dataset <- serodynamics::nepal_sees
@@ -80,6 +84,8 @@ test_that(
8084
test_that(
8185
desc = "results are consistent with unstratified SEES data",
8286
code = {
87+
announce_snapshot_file("nostrat-curve-params.csv")
88+
announce_snapshot_file("nostrat-fitted_residuals.csv")
8389
skip_on_os(c("windows", "linux"))
8490
withr::local_seed(1)
8591
dataset <- serodynamics::nepal_sees
@@ -113,6 +119,7 @@ test_that(
113119
desc = "results are consistent with unstratified SEES data with jags.post
114120
included",
115121
code = {
122+
announce_snapshot_file("nostrat-curve-params-withpost.csv")
116123
skip_on_os(c("windows", "linux"))
117124
withr::local_seed(1)
118125
dataset <- serodynamics::nepal_sees
@@ -144,6 +151,7 @@ test_that(
144151
desc = "results are consistent with unstratified SEES data with modified
145152
priors",
146153
code = {
154+
announce_snapshot_file("nostrat-curve-params-specpriors.csv")
147155
skip_on_os(c("windows", "linux"))
148156
withr::local_seed(1)
149157
dataset <- serodynamics::nepal_sees

0 commit comments

Comments
 (0)