## ## R script for 'catR' manuscript ## submitted to Journal of Statistical Software ## Authors: David Magis and Gilles Raīche ## ## The following R code is reproduced as is in the manuscript ## WARNING: because the response patterns are randomly drawn, ## the results might differ from those in the manuscript!! ## Loading the catR package require(catR) ## Creation of the item bank Bank <- createItemBank(items = 500, model = "3PL", thMin = -4, thMax = 4, step = 0.05) ## Creation of the 'Start' list Start <- list(nrItems = 1, theta = 0, startSelect = "MFI") ## Creation of the 'Test' list Test <- list(method = "WL", itemSelect = "MFI") ## Creation of the 'Stop' list Stop <- list(rule = "classification", thr = 2, alpha = 0.05) ## Creation of the 'Final' list Final <- list(method = "WL", alpha = 0.05) ## Generation of the CAT response pattern res <- randomCAT(trueTheta = 1, itemBank = Bank, start = Start, test = Test, stop = Stop, final = Final) ## displaying the output res ## Plot of the output plot(res, ci = TRUE, trueTh = TRUE, classThr = 2)