generate_item_responses_sqn: Internals: simulating responding to item in the IRTree way

View source: R/generate_responses.R

generate_item_responses_sqnR Documentation

Internals: simulating responding to item in the IRTree way

Description

Function generates responses using IRTree approach, i.e. 'sequentially'. It goes through consecutive columns of a scoring matrix, calling generate_item_responeses_gpcm to get responses at a given node of a tree and the recursively calls itself on subsets of observations with a given response with reduced scoring matrix.

Usage

generate_item_responses_sqn(
  theta,
  scoringMatrix,
  slopes,
  intercepts,
  editResponse = NULL,
  decidingOnPreviousResponse = FALSE
)

Arguments

theta

a matrix of latent traits' values

scoringMatrix

a matrix describing scoring patterns on each latent trait

slopes

a vector of slope parameters for each trait

intercepts

a vector of intercept parameters

editResponse

an optional function returning scoring matrix that should be used instead that provided by scoringMatrix; this should be function accepting two arguments: response - generated response (by the model described with the first column of the scoringMatrix) that is supposed to be edited and scoringMatrix - current scoring matrix (to be replaced)

decidingOnPreviousResponse

a logical value indicating whether first column of provided scoring matrix describes making decision whether to respond on the basis of responses to previous items or not (in this first case negative choice shouldn't reduce number of rows in a response matrix)

Value

vector of responses on item

Limitations

Because function internally relies on calling generate_item_responeses_gpcm, no normal ogive models can be used (this may be changed in the future versions).

See Also

link{generate_test_responses}, generate_item_responses_sml, generate_item_responeses_gpcm


tzoltak/rstyles documentation built on Dec. 4, 2024, 5:16 p.m.