diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2020-05-29 15:03:04 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2020-05-29 15:03:04 +0200 |
commit | 510436646b1bdd5b8cfab70be29334bd3cc9c828 (patch) | |
tree | 4b3e26f658e822e18d09e2d939a5c89214566b6d /tests/testthat/test_synthetic_data_for_UBA_2014.R | |
parent | 609bfe2fd7ecbdcad5f5d641f0db51541dcd6a4e (diff) |
Warn if standardized residuals are unlikely normal
This revealed a bug in the data returned in mkinfit$data in the case
of the d_3 algorithm, which also affected the residual plot - the
data from the direct fitting was not returned even if this was
the better method.
Diffstat (limited to 'tests/testthat/test_synthetic_data_for_UBA_2014.R')
-rw-r--r-- | tests/testthat/test_synthetic_data_for_UBA_2014.R | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/tests/testthat/test_synthetic_data_for_UBA_2014.R b/tests/testthat/test_synthetic_data_for_UBA_2014.R index 4bff1b5a..989f963a 100644 --- a/tests/testthat/test_synthetic_data_for_UBA_2014.R +++ b/tests/testthat/test_synthetic_data_for_UBA_2014.R @@ -7,8 +7,8 @@ test_that("Results are correct for SFO_lin_a", { M1 = mkinsub("SFO", "M2"), M2 = mkinsub("SFO"), use_of_ff = "max", quiet = TRUE) - fit_SFO_lin_a <- mkinfit(m_synth_SFO_lin, - synthetic_data_for_UBA_2014[[1]]$data, + fit_SFO_lin_a <- mkinfit(m_synth_SFO_lin, + synthetic_data_for_UBA_2014[[1]]$data, quiet = TRUE) # Results for SFO_lin_a from p. 48 @@ -21,19 +21,18 @@ test_that("Results are correct for SFO_lin_a", { # Results for DFOP_par_c from p. 54 test_that("Results are correct for DFOP_par_c", { - skip_on_cran() - m_synth_DFOP_par <- mkinmod(parent = mkinsub("DFOP", c("M1", "M2")), - M1 = mkinsub("SFO"), - M2 = mkinsub("SFO"), - use_of_ff = "max", quiet = TRUE) - + skip_on_cran() - fit_DFOP_par_c <- mkinfit(m_synth_DFOP_par, - synthetic_data_for_UBA_2014[[12]]$data, - quiet = TRUE) + # Supress warning about non-normal residuals, the data were generated + # using a different error model, so no wonder + suppressWarnings( + fit_DFOP_par_c <- mkinfit(m_synth_DFOP_par, + synthetic_data_for_UBA_2014[[12]]$data, + quiet = TRUE) + ) parms <- round(fit_DFOP_par_c$bparms.optim, c(1, 4, 4, 4, 4, 4, 4, 4)) - expect_equal(parms, c(parent_0 = 103.0, + expect_equal(parms, c(parent_0 = 103.0, k_M1 = 0.0389, k_M2 = 0.0095, f_parent_to_M1 = 0.5565, f_parent_to_M2 = 0.3784, k1 = 0.3263, k2 = 0.0202, g = 0.7130)) |