aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testthat')
-rw-r--r--tests/testthat/setup_script.R14
-rw-r--r--tests/testthat/test_plot.R12
2 files changed, 22 insertions, 4 deletions
diff --git a/tests/testthat/setup_script.R b/tests/testthat/setup_script.R
index 81f9248d..1bedbf65 100644
--- a/tests/testthat/setup_script.R
+++ b/tests/testthat/setup_script.R
@@ -158,3 +158,17 @@ mmkin_biphasic_mixed <- mixed(mmkin_biphasic)
nlme_biphasic <- nlme(mmkin_biphasic)
saem_biphasic_m <- saem(mmkin_biphasic, transformations = "mkin", quiet = TRUE)
saem_biphasic_s <- saem(mmkin_biphasic, transformations = "saemix", quiet = TRUE)
+
+ds_uba <- lapply(experimental_data_for_UBA_2019[6:10],
+ function(x) subset(x$data[c("name", "time", "value")]))
+names(ds_uba) <- paste("Dataset", 6:10)
+sfo_sfo_uba <- mkinmod(parent = mkinsub("SFO", "A1"),
+ A1 = mkinsub("SFO"))
+dfop_sfo_uba <- mkinmod(parent = mkinsub("DFOP", "A1"),
+ A1 = mkinsub("SFO"))
+f_uba_mmkin <- mmkin(list("SFO-SFO" = sfo_sfo_uba, "DFOP-SFO" = dfop_sfo_uba),
+ ds_uba, quiet = TRUE)
+f_uba_dfop_sfo_mixed <- mixed(f_uba_mmkin[2, ])
+f_uba_sfo_sfo_saem <- saem(f_uba_mmkin["SFO-SFO", ], quiet = TRUE, transformations = "saemix")
+#f_uba_sfo_sfo_saem <- saem(f_uba_mmkin["SFO-SFO", ], solution_type = "deSolve", quiet = TRUE) # currently fails
+f_uba_dfop_sfo_saem <- saem(f_uba_mmkin["DFOP-SFO", ], quiet = TRUE, transformations = "saemix")
diff --git a/tests/testthat/test_plot.R b/tests/testthat/test_plot.R
index 4b830fe4..db44c850 100644
--- a/tests/testthat/test_plot.R
+++ b/tests/testthat/test_plot.R
@@ -32,17 +32,21 @@ test_that("Plotting mkinfit and mmkin objects is reproducible", {
plot_err_sfo_sfo <- function() plot_err(f_sfo_sfo_desolve)
vdiffr::expect_doppelganger("plot_err for FOCUS D", plot_err_sfo_sfo)
+ plot_biphasic_mmkin <- function() plot(f_uba_dfop_sfo_mixed)
+ vdiffr::expect_doppelganger("mixed model fit for mmkin object", plot_biphasic_mmkin)
+
+ plot_biphasic_saem_s <- function() plot(f_uba_dfop_sfo_saem)
+ vdiffr::expect_doppelganger("mixed model fit for saem object with saemix transformations", plot_biphasic_saem_s)
+
skip_on_travis()
+ #plot_biphasic_mmkin <- function() plot(mixed(mmkin_biphasic))
# Biphasic fits with lots of data and fits have lots of potential for differences
- plot_biphasic_mmkin <- function() plot(mixed(mmkin_biphasic))
plot_biphasic_nlme <- function() plot(nlme_biphasic)
- plot_biphasic_saem_s <- function() plot(saem_biphasic_s)
+ #plot_biphasic_saem_s <- function() plot(saem_biphasic_s)
plot_biphasic_saem_m <- function() plot(saem_biphasic_m)
- vdiffr::expect_doppelganger("mixed model fit for mmkin object", plot_biphasic_mmkin)
vdiffr::expect_doppelganger("mixed model fit for nlme object", plot_biphasic_nlme)
- vdiffr::expect_doppelganger("mixed model fit for saem object with saemix transformations", plot_biphasic_saem_s)
vdiffr::expect_doppelganger("mixed model fit for saem object with mkin transformations", plot_biphasic_saem_m)
# different results when working with eigenvalues

Contact - Imprint