tests/testthat/test_nloptr.R

test_that("Maximum number of evaluations", {
  opt <- list(maxeval = 10)
  Bids$size.sq <- Bids$size ^ 2
  fit <- glm.hP(formula.mu = numbids ~ leglrest + rearest + finrest +
                  whtknght + bidprem + insthold + size + size.sq + regulatn,
                formula.gamma = numbids ~ 1, data = Bids, opts = opt)
  expect_true(fit$nloptr$iterations <= 10)
})

Try the DGLMExtPois package in your browser

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

DGLMExtPois documentation built on Sept. 4, 2023, 5:06 p.m.