lookAhead function

Look Ahead to Select Next Item

Look Ahead to Select Next Item

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 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)

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

  • Maintainer: Erin Rossiter
  • License: GPL-3
  • Last published: 2022-12-03

Useful links