From 7465583c0d3b0c1f72792870113ce308962db977 Mon Sep 17 00:00:00 2001 From: ntorresd Date: Mon, 14 Aug 2023 12:07:30 -0500 Subject: [PATCH] fix: minor correction to test_modelling --- tests/testthat/test_modelling.R | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/testthat/test_modelling.R b/tests/testthat/test_modelling.R index 76494b19..edea5876 100644 --- a/tests/testthat/test_modelling.R +++ b/tests/testthat/test_modelling.R @@ -7,12 +7,11 @@ test_that("individual models", { set.seed(1234) # For reproducibility library(devtools) - library(dplyr) library(vdiffr) #----- Read and prepare data - data("serodata") - data_test <- serodata %>% prepare_serodata(alpha = 0.05) + data(chagas2012) + serodata <- prepare_serodata(chagas2012, alpha = 0.05) data_constant_path <- testthat::test_path("extdata", "prev_expanded_constant.RDS") data_tv_normal_path <- testthat::test_path("extdata", "prev_expanded_tv_normal.RDS") @@ -23,7 +22,7 @@ test_that("individual models", { #----- Test for the constant model model_name <- "constant" - model_object <- run_seromodel(serodata = data_test, + model_object <- run_seromodel(serodata = serodata, foi_model = model_name, n_iters = 1000, print_summary = FALSE) @@ -37,7 +36,7 @@ test_that("individual models", { #----- Test for the tv_normal model model_name <- "tv_normal" - model_object <- run_seromodel(serodata = data_test, + model_object <- run_seromodel(serodata = serodata, foi_model = model_name, n_iters = 1000) @@ -49,7 +48,7 @@ test_that("individual models", { #----- Test for the tv_normal_log model model_name <- "tv_normal_log" - model_object <- run_seromodel(serodata = data_test, + model_object <- run_seromodel(serodata = serodata, foi_model = model_name, n_iters = 1000)