A function that returns the next item in the computerized adaptive test. This should be used
in conjunction with the updateDesign function. The raw input forms can be used
when a customNextItem function has been defined in mirtCAT.
Usage
findNextItem(x, person = NULL, test = NULL, design = NULL,
criteria = NULL, subset = NULL, all_index = FALSE)
Arguments
x
an object of class 'mirtCAT_design' returned from the mirtCAT function
when passing design_elements = TRUE
person
internal person object. To be used when customNextItem function has been
defined
test
internal test object. To be used when customNextItem function has been
defined
design
internal design object. To be used when customNextItem function has been
defined
criteria
item selection criteria (see mirtCAT's criteria input).
To be used when customNextItem function has been defined
subset
an integer vector indicating which items should be included in the optimal search;
the default NULL includes all possible items. To allow only the first 10 items to be
selected from this can be modified to subset = 1:10. This is useful when administering
a multi-unidimensional CAT session where unidimensional blocks should be clustered together
for smoother presentation. Useful when using the customNextItem function in
mirtCAT
all_index
logical; return all items instead of just the most optimal?
When TRUE a vector of items is returned instead of the most optimal,
where the items are sorted according to how
well they fit the criteria (e.g., the first element is the most optimal, followed by the second
most optimal, and so on). Note that this does not work for some selection criteria (e.g.,
'seq' or 'random')
Value
returns an integer value indicating the index of the next item to be selected or a
value of NA to indicate that the test should be terminated
## Not run:
# test defined in mirtCAT help file, first example
CATdesign <- mirtCAT(df, mod, criteria = 'MI', design_elements = TRUE)
# returns number 1 in this case, since that's the starting item
findNextItem(CATdesign)
# detemine next item if item 1 and item 10 were answered correctly, and Theta = 0.5
CATdesign <- updateDesign(CATdesign, items = c(1, 10), responses = c(1, 1), Theta = 0.5)
findNextItem(CATdesign)
findNextItem(CATdesign, all_index = TRUE) # all items rank in terms of most optimal
# alternatively, update the Theta using the internal ReferenceClass method
Person$help('Update.thetas') # internal help file for class 'Person'
CATdesign$person$Update.thetas(CATdesign$design, CATdesign$test)
findNextItem(CATdesign)
## End(Not run)