diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2015-05-15 11:03:43 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2015-05-15 11:03:43 +0200 |
commit | 4fa48c8ef79d75c008fe5cbd0f57b3d96db0b888 (patch) | |
tree | 8c6ef2df9e51bad227ddd44244e4439fc2ef1856 /tests/testthat | |
parent | fbf43bbfd6e7ed265fea1cfd0e6b0004dbb6cde2 (diff) |
Make FOMC test for FOCUS A robust towards non-convergence
Diffstat (limited to 'tests/testthat')
-rw-r--r-- | tests/testthat/test_parent_only.R | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/testthat/test_parent_only.R b/tests/testthat/test_parent_only.R index b022fe4e..c919cb9c 100644 --- a/tests/testthat/test_parent_only.R +++ b/tests/testthat/test_parent_only.R @@ -52,11 +52,10 @@ test_that("Fits for FOCUS A deviate less than 0.1% from median of values from FO expect_equivalent(dev.percent.A.SFO[[1]] < 0.1, rep(TRUE, 4)) # Fitting FOCUS A with FOMC is possible, but the correlation between - # alpha and beta obtained on Linux is 1.0000, and the test failed on Windows, - # as the Port algorithm did not converge (winbuilder, 2015-05-15) - if (.Platform$OS.type != "windows") { - fit.A.FOMC <- list(mkinfit("FOMC", FOCUS_2006_A, quiet = TRUE)) - + # alpha and beta, when obtained, is 1.0000, and the fit sometimes failed on + # Windows, as the Port algorithm did not converge (winbuilder, 2015-05-15) + fit.A.FOMC <- try(list(mkinfit("FOMC", FOCUS_2006_A, quiet = TRUE))) + if (!inherits(fit.A.FOMC, "try-error")) { median.A.FOMC <- as.numeric(lapply(subset(FOCUS_2006_FOMC_ref_A_to_F, dataset == "A", |