lookAhead {catSurv} | R Documentation |
Look Ahead to Select Next Item
Description
Selects the next item that would be asked for all possible response options to the question the respondent is currently answering.
Usage
lookAhead(catObj, item)
Arguments
catObj |
An object of class |
item |
A numeric indicating the question item the respondent is currently answering. |
Value
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.
Author(s)
Haley Acevedo, Ryden Butler, Josh W. Cutler, Matt Malis, Jacob M. Montgomery, Tom Wilkinson, Erin Rossiter, Min Hee Seo, Alex Weil
See Also
Examples
## 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)