diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2020-05-07 22:13:33 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2020-05-07 22:14:19 +0200 |
commit | 92bd33824bde6b6b21bfc7e30953092a74d3cce5 (patch) | |
tree | bb2e08ef15d8a4f4f7b04cf4f5312ec861ec1d1c /tests/testthat/test_nlme.R | |
parent | 67c8163487e776e9a378c9dfcd39c74f6e6bc507 (diff) |
Another overhaul of analytical solutions
Still in preparation for analytical solutions of coupled models
Diffstat (limited to 'tests/testthat/test_nlme.R')
-rw-r--r-- | tests/testthat/test_nlme.R | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/testthat/test_nlme.R b/tests/testthat/test_nlme.R index e5e19c60..31fb19de 100644 --- a/tests/testthat/test_nlme.R +++ b/tests/testthat/test_nlme.R @@ -2,20 +2,21 @@ context("Nonlinear mixed-effects models") library(nlme) +sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) + test_that("nlme_function works correctly", { - sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) m_SFO <- mkinmod(parent = mkinsub("SFO")) d_SFO_1 <- mkinpredict(m_SFO, - c(k_parent_sink = 0.1), + c(k_parent = 0.1), c(parent = 98), sampling_times) d_SFO_1_long <- mkin_wide_to_long(d_SFO_1, time = "time") d_SFO_2 <- mkinpredict(m_SFO, - c(k_parent_sink = 0.05), + c(k_parent = 0.05), c(parent = 102), sampling_times) d_SFO_2_long <- mkin_wide_to_long(d_SFO_2, time = "time") d_SFO_3 <- mkinpredict(m_SFO, - c(k_parent_sink = 0.02), + c(k_parent = 0.02), c(parent = 103), sampling_times) d_SFO_3_long <- mkin_wide_to_long(d_SFO_3, time = "time") @@ -33,7 +34,6 @@ test_that("nlme_function works correctly", { # The following assignment was introduced for nlme as evaluated by testthat # to find the function assign("nlme_f", nlme_f, pos = globalenv()) - assign("sampling_times", sampling_times, pos = globalenv()) m_nlme_raw <- nlme(value ~ SSasymp(time, 0, parent_0, log_k_parent_sink), data = grouped_data, @@ -101,7 +101,7 @@ test_that("nlme_function works correctly in other cases", { SFO <- mkinmod(parent = mkinsub("SFO")) pred_sfo <- function(k) { mkinpredict(SFO, - c(k_parent_sink = k), + c(k_parent = k), c(parent = 100), sampling_times) } |