aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-10-29 12:08:56 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-10-29 12:08:56 +0200
commit1aad99fea0070ab23b17acda618a08b12c273380 (patch)
tree3c1b0596749ba686721e21c3077e0b7c3b99a92f /tests
parentfe66a82e0519b0649dca20dbf7633c0d24e65e70 (diff)
Another attempt to make the test robust
As the last update failed on travis. Now we should be more robust, as rounding to one digit works better when parameters are log-transformed (mkin transformations) in the output.
Diffstat (limited to 'tests')
-rw-r--r--tests/testthat/print_dfop_saemix_1.txt24
-rw-r--r--tests/testthat/test_mixed.R2
2 files changed, 25 insertions, 1 deletions
diff --git a/tests/testthat/print_dfop_saemix_1.txt b/tests/testthat/print_dfop_saemix_1.txt
new file mode 100644
index 00000000..f427b3e6
--- /dev/null
+++ b/tests/testthat/print_dfop_saemix_1.txt
@@ -0,0 +1,24 @@
+Kinetic nonlinear mixed-effects model fit by SAEM
+Structural model:
+d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
+ time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))
+ * parent
+
+Data:
+270 observations of 1 variable(s) grouped in 15 datasets
+
+Likelihood computed by importance sampling
+ AIC BIC logLik
+ 1409 1415 -695
+
+Fitted parameters:
+ estimate lower upper
+parent_0 100.04 98.89 101.20
+log_k1 -4.12 -4.24 -4.00
+log_k2 -2.67 -2.90 -2.44
+g_qlogis 0.43 0.22 0.64
+a.1 0.92 0.67 1.16
+b.1 0.05 0.04 0.06
+SD.log_k1 0.22 0.14 0.30
+SD.log_k2 0.36 0.21 0.51
+SD.g_qlogis 0.14 -0.11 0.39
diff --git a/tests/testthat/test_mixed.R b/tests/testthat/test_mixed.R
index 8e4d668b..646b6110 100644
--- a/tests/testthat/test_mixed.R
+++ b/tests/testthat/test_mixed.R
@@ -11,7 +11,7 @@ test_that("Print methods work", {
expect_known_output(print(mixed(mmkin_sfo_1), digits = 2), "print_mmkin_sfo_1_mixed.txt")
expect_known_output(print(dfop_nlme_1, digits = 1), "print_dfop_nlme_1.txt")
- expect_known_output(print(sfo_saem_1_reduced, digits = 1), "print_sfo_saem_1_reduced.txt")
+ expect_known_output(print(dfop_saemix_1, digits = 1), "print_dfop_saemix_1.txt")
})
test_that("nlme results are reproducible to some degree", {

Contact - Imprint