# Loading the 'tcals' parameters
data(tcals)
tcals <- as.matrix(tcals)
# Item bank creation with 'tcals' item parameters
bank <- createItemBank(tcals)
# Creation of a starting list: 5 items, initial theta 0, bw 2
start<-list(nrItems=5, theta=0, bw=2)
# Creation of 'test' and 'final' lists: weighted likelihood
# estimation of ability (both provisional and final)
test<-list(method="WL")
final<-test
# Creation of a stopping rule: precision criterion, standard
# error to be reached 0.3
stop<-list(rule="precision", thr=0.3)
# CAT test
res<-randomCAT(0, bank, start=start, test=test, stop=stop,
final=final)
# New 'test' and 'final' rules (BM and EAP estimation
# with Jeffreys' prior)
test2<-list(method="BM", priorDist="Jeffreys")
final2<-list(method="EAP", priorDist="Jeffreys")
# New stopping rule: classification criterion, with
# classification threshold 0 and alpha level 0.05
stop2<-list(rule="classification", thr=0, alpha=0.05)
# CAT test with new 'test', 'stop' and 'final' rules
res2<-randomCAT(0, bank, start=start, test=test2, stop=stop2,
final=final2)
# New stopping rule: classification criterion, with
# classification threshold 0.5 and alpha level 0.05
stop3<-list(rule="classification", thr=0.5, alpha=0.05)
# CAT test with new 'stop' rule
res3<-randomCAT(0, bank, start=start, test=test2, stop=stop3,
final=final2)
# Plotting results
plot(res)
plot(res, ci=FALSE)
plot(res, thr=0)
plot(res, thr=0.5)
plot(res2,thr=0)
plot(res3, thr=0.5)
Run the code above in your browser using DataLab