# generate an item pool
pool <- gen.irt(1, 100)$items
pool$content <- sample(1:3, nrow(pool), replace=TRUE)
# cat simulation: 10-30 items
opts <- list(min=10, max=30, stop.se=.3)
x <- cat.sim(0.1, pool, opts)
x
plot(x)
# cat simulation with randomesque
opts <- list(min=10, max=30, stop.se=.3, select.random=10)
x <- cat.sim(0.1, pool, opts)
plot(x)
# cat simulation with content balancing
opts <- list(min=10, max=30, stop.se=.3, ccat.target=c(.5,.3,.2), ccat.random=5)
x <- cat.sim(0.1, pool, opts, cat.select=cat.select.ccat)
freq(x$items$content, 1:3)
Run the code above in your browser using DataLab