tests/testthat/test-vgam.R

skip_on_os(c("mac", "solaris"))
skip_if_not_installed("VGAM")
unloadNamespace("gam")

test_that("ggpredict", {
  data("hunua", package = "VGAM")
  m1 <- VGAM::vgam(agaaus ~ vitluc + VGAM::s(altitude, df = 2), VGAM::binomialff, data = hunua)
  p <- ggpredict(m1, "vitluc")
  expect_equal(p$predicted[1], 0.2491865, tolerance = 1e-3)
})

Try the ggeffects package in your browser

Any scripts or data that you put into this service are public.

ggeffects documentation built on Sept. 12, 2024, 7:41 a.m.