View source: R/checkStopRule.R
checkStopRule | R Documentation |
This command tests whether one of the specified stopping rules is satisfied in order to stop the CAT.
checkStopRule(th, se, N, it = NULL, model = NULL, D = 1, stop)
th |
numeric: the current ability estimate. |
se |
numeric: the current standard error estimate. |
N |
numeric: the current number of administered items. |
it |
the matrix of parameters of currently available items (default is |
model |
either |
D |
numeric: the metric constant. Default is |
stop |
a list with valuable element names and contents to set the stopping rule, as an input of the |
The checkStopRule
function checks whether at least one of the stopping rules was satisfied at the current step of the CAT test process. It mainly serves as an internal application forrandomCAT
function.
The stop
list must be supplied accordingly to the requested list in the randomCAT()
and in the simulateRespondents()
functions.
Three input values must be supplied: th
as the current ability estimate; se
as the current standard error value related to th
estimate; and N
as the current test length (i.e., number of administered items). In addition, if the stop$rule
vector holds the option "minInfo"
, three additional input value smust be supplied: it
with the item parameters or all available items in the bank (i.e., previously administered items should not be set as input); model
to specify the type of IRT model, either dichotomous or polytomous (see Pi
fir further details); and possibly the scaling constant D
set to one by default.
All stopping rules are being assessed and if at least one of them is satisfied, the output list will hold the vector of rules's nmaes that were satisfied through the rule
argument). If none of the stopping rules were satisfied, this rule
output argument is simply NULL
.
A list with two arguments:
decision |
a logical value indicating whether at least one of the stopping rules was satisfied ( |
rule |
either a vector with the names of the stopping rules that were satisfied, or |
David Magis
Department of Psychology, University of Liege, Belgium
david.magis@uliege.be
Haley, D.C. (1952). Estimation of the dosage mortality relationship when the dose is subject to error. Technical report no 15. Palo Alto, CA: Applied Mathematics and Statistics Laboratory, Stanford University.
Magis, D. and Barrada, J. R. (2017). Computerized Adaptive Testing with R: Recent Updates of the Package catR. Journal of Statistical Software, Code Snippets, 76(1), 1-18. doi: 10.18637/jss.v076.c01
Magis, D., and Raiche, G. (2012). Random Generation of Response Patterns under Computerized Adaptive Testing with the R Package catR. Journal of Statistical Software, 48 (8), 1-31. doi: 10.18637/jss.v048.i08
randomCAT
, simulateRespondents
, Pi
# Creation of a 'stop' list with two possible rules stop <- list(rule = c("length", "precision"), thr = c(20, 0.3)) # Example of successful 'length' rule checkStopRule(th = 0.35, se = 0.41, N = 20, stop = stop) # Example of successful 'precision' rule checkStopRule(th = 0.35, se = 0.29, N = 15, stop = stop) # Example of jointly successful 'length' and 'precision' rules checkStopRule(th = 0.35, se = 0.29, N = 20, stop = stop) # Example without sucessfull rule checkStopRule(th = 0.35, se = 0.31, N = 18, stop = stop) # Creation of a short bank of available items under 2PL it <- genDichoMatrix(items = 5, model = "2PL", seed = 1) # Computation of maximum information at ability level 0.35 maxI <- max(Ii(0.35, it)$Ii) # Creation of a 'stop' list with four possible rules and too large threshold for 'minInfo' stop <- list(rule = c("length", "precision", "classification", "minInfo"), thr = c(20, 0.3, 1, maxI-0.01), alpha = 0.05) # Example with sucessfull 'classification' rule only checkStopRule(th = 0.35, se = 0.31, N = 18, it = it, stop = stop) # Creation of a 'stop' list with four possible rules and too large threshold for 'minInfo' stop <- list(rule = c("length", "precision", "classification", "minInfo"), thr = c(20, 0.3, 1, maxI+0.01), alpha = 0.05) # Example with sucessfull 'minInfo' rule only checkStopRule(th = 0.35, se = 0.55, N = 18, it = it, stop = stop)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.