aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat/test_FOCUS_D_UBA_expertise.R
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testthat/test_FOCUS_D_UBA_expertise.R')
-rw-r--r--tests/testthat/test_FOCUS_D_UBA_expertise.R28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/testthat/test_FOCUS_D_UBA_expertise.R b/tests/testthat/test_FOCUS_D_UBA_expertise.R
index b12834e5..5d5a801a 100644
--- a/tests/testthat/test_FOCUS_D_UBA_expertise.R
+++ b/tests/testthat/test_FOCUS_D_UBA_expertise.R
@@ -56,3 +56,31 @@ test_that("DT50/90 are correct for FOCUS D when not using formation fractions",
# References:
# Ranke (2014) Prüfung und Validierung von Modellierungssoftware als Alternative
# zu ModelMaker 4.0, Umweltbundesamt Projektnummer 27452
+
+context("The t-test for significant difference from zero")
+
+test_that("The t-value for fits using internal transformations corresponds with result from FME", {
+
+ expect_equal(signif(summary(fit.default)$bpar[, "t value"], 5),
+ c(parent_0 = 61.720, k_parent_sink = 12.777, k_parent_m1 = 24.248, k_m1_sink = 7.3486))
+
+})
+
+m_synth_DFOP_par.minff <- mkinmod(parent = mkinsub("DFOP", c("M1", "M2")),
+ M1 = mkinsub("SFO"),
+ M2 = mkinsub("SFO"),
+ use_of_ff = "min", quiet = TRUE)
+
+fit_DFOP_par_c_2 <- mkinfit(m_synth_DFOP_par.minff,
+ synthetic_data_for_UBA_2014[[12]]$data,
+ quiet = TRUE)
+
+test_that("The t-value for fits using internal transformations corresponds with results from FME, synthetic data", {
+
+ # Note that the k1 and k2 are exchanged in the untransformed fit evaluated with FME for this test
+ expect_equal(signif(summary(fit_DFOP_par_c_2)$bpar[1:7, "t value"], 5),
+ c(parent_0 = 80.054, k_M1_sink = 12.291, k_M2_sink = 10.588,
+ f_parent_to_M1 = 21.4960, f_parent_to_M2 = 24.0890,
+ k1 = 16.1450, k2 = 8.1747))
+
+})

Contact - Imprint