Skip to content

Instantly share code, notes, and snippets.

@rpietro
Created February 11, 2013 22:44
Show Gist options
  • Save rpietro/4758311 to your computer and use it in GitHub Desktop.
Save rpietro/4758311 to your computer and use it in GitHub Desktop.
Example described in catR's paper at http://goo.gl/4FUaY
library(catR)
Bank <- createItemBank(items = 500, model = "3PL", thMin = -4, thMax = 4, step = 0.05)
Start <- list(nrItems = 1, theta = 0, startSelect = "MFI")
Test <- list(method = "WL", itemSelect = "MFI")
Stop <- list(rule = "classification", thr = 2, alpha = 0.05)
Final <- list(method = "WL", alpha = 0.05)
res <- randomCAT(trueTheta = 1, itemBank = Bank, start = Start, test = Test, stop = Stop, final = Final)
res
plot(res, ci = TRUE, trueTh = TRUE, classThr = 2)
data("tcals")
Bank2 <- createItemBank(tcals, cb = TRUE)
Start2 <- list(nrItems = 5, theta = 0, halfRange = 2)
Test2 <- list(method = "EAP", itemSelect = "Urry", randomesque = 4)
Stop2 <- list(rule = "length", thr = 12)
Final2 <- list(method = "EAP")
cbList <- list(names = c("Audio1", "Audio2", "Written1", "Written2", "Written3"), props = c(0.1, 0.2, 0.2, 0.2, 0.3))
res2 <- randomCAT(trueTheta = 0, itemBank = Bank2, start = Start2, test = Test2, stop = Stop2, final = Final2, cbControl = cbList)
res2
plot(res2, ci = TRUE, trueTh = TRUE, classThr = 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment