Skip to content

Commit

Permalink
add non-nest2 test
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Aug 2, 2024
1 parent fe51b2a commit c502ef7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/tests/test-10-extras.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
context('extras')

test_that('extras', {
suppressMessages(require(nonnest2, quietly=TRUE, warn.conflicts=FALSE))
mod_2PL <- mirt(expand.table(LSAT7), 1, SE=TRUE, verbose=FALSE)
itemtype <- c('2PL', '2PL', '2PL', '2PL', 'ggum')
mod_2PL_ggum <- mirt(expand.table(LSAT7), model=1, itemtype=itemtype, SE=TRUE,
verbose=FALSE)
out <- vuongtest(mod_2PL, mod_2PL_ggum)
expect_equal(out$p_omega, 2.206736e-05, tol=.0001)
expect_equal(as.numeric(out$p_LRT), c(0.6205581, 0.3794419), tol=.0001)

require(boot, quietly=TRUE, warn.conflicts=FALSE)
data <- expand.table(LSAT7)
data <- rbind(data, data)
Expand Down

0 comments on commit c502ef7

Please sign in to comment.