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_FOCUS_D_UBA_expertise.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_FOCUS_D_UBA_expertise.R')
-rw-r--r-- | tests/testthat/test_FOCUS_D_UBA_expertise.R | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/testthat/test_FOCUS_D_UBA_expertise.R b/tests/testthat/test_FOCUS_D_UBA_expertise.R index be2806de..101c8e15 100644 --- a/tests/testthat/test_FOCUS_D_UBA_expertise.R +++ b/tests/testthat/test_FOCUS_D_UBA_expertise.R @@ -2,11 +2,10 @@ context("Results for FOCUS D established in expertise for UBA (Ranke 2014)") # Results are from p. 40 -# Avoid warnings due to the zero value in the data for m1 at time zero -FOCUS_D <- subset(FOCUS_2006_D, value != 0) - test_that("Fits without formation fractions are correct for FOCUS D", { - fit.noff <- mkinfit(SFO_SFO, FOCUS_D, quiet = TRUE) + expect_warning( + fit.noff <- mkinfit(SFO_SFO, FOCUS_D, quiet = TRUE), + "p-value.*Shapiro-Wilk") expect_equal(round(as.numeric(endpoints(fit.noff)$distimes["parent", ]), 2), c(7.02, 23.33)) @@ -16,8 +15,7 @@ test_that("Fits without formation fractions are correct for FOCUS D", { }) test_that("Fits with formation fractions are correct for FOCUS D", { - skip_on_cran() - fit.ff <- mkinfit(SFO_SFO.ff, FOCUS_D, quiet = TRUE) + fit.ff <- f_sfo_sfo.ff expect_equivalent(round(fit.ff$bparms.optim, c(2, 4, 4, 4)), c(99.60, 0.0987, 0.0053, 0.5145)) |