From 051268e3b1680792fbe3c5fccaecc09e74660d0f Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 8 Aug 2022 11:03:32 +0200 Subject: Error on unsupported saemix transformations Also, support FOMC with saemix transformations --- tests/testthat/test_saemix_parent.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/testthat/test_saemix_parent.R') 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") -- cgit v1.2.1