Skip to content

Commit 2bcb13d

Browse files
Add test for binomial
1 parent 320be6a commit 2bcb13d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/testthat/test-nongg.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ test_that("cf_data", {
4141
# Fit with other packages
4242
expect_error(cf_data(x,y,z, fit="locfit"), NA)
4343
expect_error(cf_data(x,y,z, fit="gam"), NA)
44+
# Fit binomial
45+
expect_error(cf_data(x,y,round(pmax(0, pmin(1, z))), family="binomial", fit="locfit"), NA)
46+
# gam needs more data to avoid error
47+
expect_error(cf_data(c(x,x+.01),c(y,y+.01),rep(round(pmax(0, pmin(1, z))), 2), family=binomial(), fit="gam"), NA)
4448

4549
# Errors
4650
expect_error(cf_data(cbind(x,y,y),y=z))

0 commit comments

Comments
 (0)