lookAhead | R Documentation |
Selects the next item that would be asked for all possible response options to the question the respondent is currently answering.
lookAhead(catObj, item)
catObj |
An object of class |
item |
A numeric indicating the question item the respondent is currently answering. |
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.
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.
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
selectItem
## Loading ltm Cat object data(ltm_cat) ## Store example answers setAnswers(ltm_cat) <- c(1,0,1,0,1, rep(NA, 35)) ## What should be asked next if respondent is currently answering item 6 lookAhead(ltm_cat, 6) ## Loading grm Cat object data(grm_cat) ## Store example answers setAnswers(grm_cat) <- c(4,3,5,1,1, rep(NA, 13)) ## What should be asked next if respondent is currently answering item 6 lookAhead(grm_cat, 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.