Skip to content

Commit

Permalink
Fix threshold model tidy() unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
seananderson committed Nov 29, 2024
1 parent 884e5a3 commit d60107d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/testthat/test-threshold-models.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test_that("A logistic threshold model fits", {
expect_true("depth_scaled-s50" %in% tidy(m)$term)
expect_true("depth_scaled-s95" %in% tidy(m)$term)
expect_true("depth_scaled-smax" %in% tidy(m)$term)
expect_equal(tidy(m)[,"estimate",drop=TRUE], c(1.555 , 1.655 , 1.718 , 1.138, -0.979, -3.173 , 1.760), tolerance = 1e-3)
expect_equal(tidy(m)[,"estimate",drop=TRUE], c(1.555 , 1.655 , 1.718 , 1.138, -0.979, -0.937 , 1.760), tolerance = 1e-3)
})

test_that("A linear threshold model fits", {
Expand Down Expand Up @@ -114,3 +114,4 @@ test_that("A linear threshold *delta* model fits", {
expect_equal(t1$std.error, td1$std.error, tolerance = 1e-5)
expect_equal(t2$std.error, td2$std.error, tolerance = 1e-5)
})

0 comments on commit d60107d

Please sign in to comment.