diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2015-06-21 01:46:51 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2015-06-21 15:23:20 +0200 |
commit | 6733555d7a9315c55001770bacc4c61c4d4f39d5 (patch) | |
tree | f645a69a54fa6b58cfd65ed581d5f2b88950f6d6 /tests/testthat/test_FOCUS_D_UBA_expertise.R | |
parent | f0da2e311eb33fa5851956e958e91c25b4da5c1e (diff) |
Do the t-test for untransformed parametersv0.9-36
Diffstat (limited to 'tests/testthat/test_FOCUS_D_UBA_expertise.R')
-rw-r--r-- | tests/testthat/test_FOCUS_D_UBA_expertise.R | 28 |
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)) + +}) |