tests/testthat/test-bp.R

test_that("Error when num_item is NULL", {
  true_theta = rnorm(100)
  b <- runif(100, -3, 3)
  a <- runif(100, 0.6, 2)
  parameters <- data.frame(b, a)
  data <- sirt::sim.raschtype(true_theta, b = b, fixed.a = a)
  expect_error(bench(data, starting_theta = true_theta, item_par = parameters),
               "You must specify the number of items for the STFs!")
})

Try the shortIRT package in your browser

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

shortIRT documentation built on Sept. 9, 2025, 5:33 p.m.