Skip to content

Commit

Permalink
add some basic tests just to run fitted_values on some LSS and scam m…
Browse files Browse the repository at this point in the history
…odels
  • Loading branch information
gavinsimpson committed Oct 17, 2023
1 parent 11c7cd1 commit ad8599b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/testthat/test-fitted-values.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,15 @@ test_that("fitted_values() works for an ocat GAM", {
expect_s3_class(fv, c("tbl_df", "tbl", "data.frame"))
expect_identical(nrow(new_df), nrow(fv))
})

test_that("fitted values works for a univariate scam model", {
expect_silent(fv <- fitted_values(m_scam))
})

test_that("fitted values works for a ziplss model", {
expect_silent(fv <- fitted_values(m_ziplss))
})

test_that("fitted values works for a gaulss model", {
expect_silent(fv <- fitted_values(m_gaulss))
})

0 comments on commit ad8599b

Please sign in to comment.