aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-08-08 11:03:32 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-08-08 11:03:32 +0200
commit051268e3b1680792fbe3c5fccaecc09e74660d0f (patch)
tree8971d16737c15d78d33e1bc305291641bd2bbc82 /tests
parent22d21cf5efcfb52c59c969d393bb0be077e982dd (diff)
Error on unsupported saemix transformations
Also, support FOMC with saemix transformations
Diffstat (limited to 'tests')
-rw-r--r--tests/testthat/test_saemix_parent.R4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/testthat/test_saemix_parent.R b/tests/testthat/test_saemix_parent.R
index 7f550999..5d9a01de 100644
--- a/tests/testthat/test_saemix_parent.R
+++ b/tests/testthat/test_saemix_parent.R
@@ -30,12 +30,14 @@ test_that("Parent fits using saemix are correctly implemented", {
round(s_sfo_n$confint_back["k_parent", "est."], 3))
mmkin_fomc_1 <- mmkin("FOMC", ds_fomc, quiet = TRUE, error_model = "tc", cores = n_cores)
- fomc_saem_1 <- saem(mmkin_fomc_1, quiet = TRUE)
+ fomc_saem_1 <- saem(mmkin_fomc_1, quiet = TRUE, transformations = "saemix")
+ fomc_saem_2 <- saem(mmkin_fomc_1, quiet = TRUE, transformations = "mkin")
ci_fomc_s1 <- summary(fomc_saem_1)$confint_back
fomc_pop <- as.numeric(fomc_pop)
expect_true(all(ci_fomc_s1[, "lower"] < fomc_pop))
expect_true(all(ci_fomc_s1[, "upper"] > fomc_pop))
+ expect_equal(endpoints(fomc_saem_1), endpoints(fomc_saem_2), tol = 0.01)
mmkin_fomc_2 <- update(mmkin_fomc_1, state.ini = 100, fixed_initials = "parent")
fomc_saem_2 <- saem(mmkin_fomc_2, quiet = TRUE, transformations = "mkin")

Contact - Imprint