tests/testthat/test-simulation.R

test_that("simulation does not work when parameters are outside their range",{
  # negative binomial regression
  library(MASS)
  fit_nb <- glm.nb(Days ~ Sex/(Age + Eth*Lrn), data = quine)
  fit_nb$theta <- -1 # theta>0!
  expect_error(simulation(fit_nb))
})

Try the ib package in your browser

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

ib documentation built on April 5, 2022, 1:13 a.m.