diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2022-08-08 11:03:32 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2022-08-08 11:03:32 +0200 |
commit | 051268e3b1680792fbe3c5fccaecc09e74660d0f (patch) | |
tree | 8971d16737c15d78d33e1bc305291641bd2bbc82 /tests/testthat | |
parent | 22d21cf5efcfb52c59c969d393bb0be077e982dd (diff) |
Error on unsupported saemix transformations
Also, support FOMC with saemix transformations
Diffstat (limited to 'tests/testthat')
-rw-r--r-- | tests/testthat/test_saemix_parent.R | 4 |
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") |