Created
October 3, 2017 14:16
-
-
Save ramiroluz/c7de6ac845bc119008ce5b3fdf2d2faf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/philchalmers/mirtCAT/blob/master/R/extract.mirtCAT.R | |
set.seed(1234) | |
nitems <- 25 | |
itemnames <- paste0('Item.', 1:nitems) | |
a <- matrix(rlnorm(nitems, .2, .3)) | |
d <- matrix(rnorm(nitems)) | |
dat <- simdata(a, d, 500, itemtype = 'dich') | |
colnames(dat) <- itemnames | |
mod <- mirt(dat, 1, verbose = FALSE, TOL = .01) | |
# simple math items | |
questions <- answers <- character(nitems) | |
choices <- matrix(NA, nitems, 5) | |
spacing <- floor(d - min(d)) + 1 #easier items have more variation in the options |
Author
ramiroluz
commented
Oct 3, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment