diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2022-03-19 10:42:07 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2022-03-19 10:42:07 +0100 |
commit | 2728910b96f0ec7dd7ccd97fc6c1f6677e5e352d (patch) | |
tree | 6b159ac1367ab23e148b98689401eaf768f620d5 /tests | |
parent | d03a6abad27d6eef13dceb64f31b1278bb816c00 (diff) |
Test saemix without special analytical solutions
Also increase the performance a bit (from about 210 s to about 140 s in
the case of DFOP with four chains and 300, 100 iterations).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testthat/test_saemix_parent.R | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/testthat/test_saemix_parent.R b/tests/testthat/test_saemix_parent.R index 340db6f1..731228d9 100644 --- a/tests/testthat/test_saemix_parent.R +++ b/tests/testthat/test_saemix_parent.R @@ -92,3 +92,15 @@ test_that("Parent fits using saemix are correctly implemented", { # HS would likely benefit from implemenation of transformations = "saemix" }) +test_that("We can also use mkin solution methods for saem", { + expect_error(saem(mmkin_dfop_1, quiet = TRUE, transformations = "saemix", solution_type = "analytical"), + "saemix transformations is only supported if an analytical solution is implemented" + ) + skip_on_cran() # This still takes almost 2.5 minutes although we do not solve ODEs + dfop_saemix_3 <- saem(mmkin_dfop_1, quiet = TRUE, transformations = "mkin", + solution_type = "analytical") + distimes_dfop <- endpoints(dfop_saemix_1)$distimes + distimes_dfop_analytical <- endpoints(dfop_saemix_3)$distimes + rel_diff <- abs(distimes_dfop_analytical - distimes_dfop) / distimes_dfop + expect_true(all(rel_diff < 0.01)) +}) |