Skip to content

Commit

Permalink
update test, due to changes in DHARMa::createData()
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 21, 2024
1 parent 6b1020e commit 8b52f6c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test-check_residuals.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ test_that("check_residuals and simulate_residuals", {
# check raw residuals
expect_equal(
head(residuals(res)),
c(0.55349, 0.44012, 0.39826, 0.9825, 0.90753, 0.05809),
c(0.01815, 0.7062, 0.56076, 0.19282, 0.31423, 0.10115),
tolerance = 1e-4,
ignore_attr = TRUE
)
expect_equal(
head(residuals(res, quantile_function = stats::qnorm)),
c(0.13448, -0.15068, -0.25785, 2.10826, 1.3257, -1.57097),
c(-2.09365, 0.54232, 0.1529, -0.86756, -0.4839, -1.27504),
tolerance = 1e-4,
ignore_attr = TRUE
)
Expand Down Expand Up @@ -57,10 +57,10 @@ test_that("check_residuals and simulate_residuals", {

# check_residuals
out <- check_residuals(res)
expect_equal(out, 0.01884602, ignore_attr = TRUE, tolerance = 1e-4)
expect_equal(out, 0.02574286, ignore_attr = TRUE, tolerance = 1e-4)
expect_identical(
capture.output(print(out)),
"Warning: Non-uniformity of simulated residuals detected (p = 0.019)."
"Warning: Non-uniformity of simulated residuals detected (p = 0.026)."
)
expect_error(simulate_residuals(m, iterations = 1), "`iterations` must be")

Expand Down

0 comments on commit 8b52f6c

Please sign in to comment.