r - mirt simdata Error in sample.int(length(x), size, replace, prob) : too few positive probabilities -


i'm trying use mirt package in r simulate responses multidimensional item response model, via simdata() function.

in jstat article introducing package simulated data used illustrate confmirt() function, , code used produce simulated data presented in appendix b, as

library(mirt) <- matrix(c(1.5, na, 0.5, na, 1, na, 1, 0.5, na, 1.5, na, 0.5,               na, 1, na, 1), ncol = 2, byrow = true)  d <- matrix(c(-1, na, na, -1.5, na, na, 1.5, na, na, 0, na, na,                3, 2, -0.5, 2.5, 1, -1, 2, 0, na, 1, na, na),                 ncol = 3, byrow = true)  sigma <- diag(2) sigma[1, 2] <- sigma[2, 1] <- 0.4  simdata2 <- simdata(a, d, 2000, sigma) 

this doesn't work, because simdata() function has since been updated, , requires item type specified. however, when try amend code specifying item type dichotomous, simdata2 <- simdata(a, d, 2000, "dich", sigma), function still not run me, , error noted in title error in sample.int(length(x), size, replace, prob): few positive probabilities.

i tried dig try understand going on, unsuccessful. if understand causing error me avoid when try create own simulated dataset (in initial trials, did receive same error). questions asked here similar, still unable diagnose causing error.

thanks in advance.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -