cat.sim simulates CAT sessions with user-defined algorithms
cat.sim(theta, pool, opts, cat.select = cat.select.default, cat.estimate = cat.estimate.default, cat.stop = cat.stop.default, debug = FALSE)
cat.select.default(cat.data)
cat.estimate.default(cat.data)
cat.stop.default(cat.data)
"print"(x, ...)
"plot"(x, ...)cat objectcat.sim returns a cat object (see details section)cat.select.default returns a list with an selected item (item) and an updated pool (pool)cat.estimate.default returns a numeric theta estimatecat.stop.default returns a boolean value: TRUE to stop and FALSE to continue
cat.data which is passed to
cat.select, cat.estimate, and cat.stop. Besides, cat.data
contains outpus too. In details, cat.data includes pool (the item pool),
opts (options passed from arguments), len (test length),
true (true theta), est (estimated theta), items administered items),
stats (history of response, theta, se), and cat.data$admin (combining items and stats)
When writing new selection, estimation, termination functions, use cat.data as the only argument
and follow the structure strictly. For example, the selection function should return a list of
selected item (item) and updated pool (pool). e.g., foo(cat.data){...; return(list(item=item, pool=pool))}.
The estimation function should return an estimated theta. e.g., foo(cat.data){...; return(theta)}.
The termination function should return a boolean value. e.g., foo(cat.data){...; return(FALSE)}cat.select.default randomly selects an item from the k (set in options using keyword random or 5 by default) most informative items.
cat.estimate.default estimates theta using EAP for a response vector of all 1's or 0's and MLE otherwise
cat.stop.default evaluates one of the three criteria after reaching minimum lenght:
(1) if opts$stop.se is set, then evalute if the se reaches the se threshold;
(2) if opts$stop.mi is set, then evalute if all item fails to reach the mi threshold;
(3) if opts$stop.cut is set, then evalute if the 95
pool <- gen.irt(1, 100)$items
opts <- list(min=10, max=30, stop.se=.3)
x <- cat.sim(0.1, pool, opts)
x
plot(x)
Run the code above in your browser using DataLab