aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat/setup_script.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2019-11-09 01:05:51 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2019-11-09 01:05:51 +0100
commit20b9c584e7c43ecbb708459e531c24a1a4751e17 (patch)
treea0dd523fc6cb60e33420b0eb9bf79307e5b2a2a4 /tests/testthat/setup_script.R
parentead1f286271923f57d83aed41cb34181a10773ef (diff)
Add a lack-of-fit test
- Switch an example dataset in the test setup to a dataset with replicates, adapt tests - Skip the test for lrtest with an update specification as it does not only fail when pkgdown generates static help pages, but also in testthat
Diffstat (limited to 'tests/testthat/setup_script.R')
-rw-r--r--tests/testthat/setup_script.R10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/testthat/setup_script.R b/tests/testthat/setup_script.R
index 9becdd2a..e33f4af7 100644
--- a/tests/testthat/setup_script.R
+++ b/tests/testthat/setup_script.R
@@ -32,9 +32,6 @@ f_1_mkin_trans <- mkinfit("SFO", FOCUS_2006_A, quiet = TRUE)
f_1_mkin_notrans <- mkinfit("SFO", FOCUS_2006_A, quiet = TRUE,
transform_rates = FALSE)
-f_2_mkin <- mkinfit("DFOP", FOCUS_2006_C, quiet = TRUE)
-f_2_nls <- nls(value ~ SSbiexp(time, A1, lrc1, A2, lrc2), data = FOCUS_2006_C)
-
# mmkin object of parent fits for tests
models <- c("SFO", "FOMC", "DFOP", "HS")
fits <- mmkin(models,
@@ -62,11 +59,14 @@ f_sfo_sfo.ff <- mkinfit(SFO_SFO.ff,
subset(FOCUS_2006_D, value != 0),
quiet = TRUE)
-# Two metabolites
SFO_lin_a <- synthetic_data_for_UBA_2014[[1]]$data
-
DFOP_par_c <- synthetic_data_for_UBA_2014[[12]]$data
+f_2_mkin <- mkinfit("DFOP", DFOP_par_c, quiet = TRUE)
+f_2_nls <- nls(value ~ SSbiexp(time, A1, lrc1, A2, lrc2), data = subset(DFOP_par_c, name == "parent"))
+f_2_anova <- lm(value ~ as.factor(time), data = subset(DFOP_par_c, name == "parent"))
+
+# Two metabolites
m_synth_SFO_lin <- mkinmod(
parent = mkinsub("SFO", "M1"),
M1 = mkinsub("SFO", "M2"),

Contact - Imprint