Selects the next item that would be asked for all possible response options to the question the respondent is currently answering.
lookAhead(catObj, item)
Arguments
catObj: An object of class Cat
item: A numeric indicating the question item the respondent is currently answering.
Returns
A function lookAhead returns a data.frame. The the first column of the data frame is the possible response option to the question the respondent is currently answering and the second column is the next item that should be asked given each response.
Note
This function is to allow users to access the internal functions of the package. During item selection, all calculations are done in compiled C++ code.
Examples
## Loading ltm Cat objectdata(ltm_cat)## Store example answerssetAnswers(ltm_cat)<- c(1,0,1,0,1, rep(NA,35))## What should be asked next if respondent is currently answering item 6lookAhead(ltm_cat,6)## Loading grm Cat objectdata(grm_cat)## Store example answerssetAnswers(grm_cat)<- c(4,3,5,1,1, rep(NA,13))## What should be asked next if respondent is currently answering item 6lookAhead(grm_cat,6)
See Also
selectItem
Author(s)
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil