make_item: Creating object representing an item

Description Usage Arguments Value

View source: R/make_item.R

Description

Function mostly performs checks whether provided arguments are reasonable and match each other.

Usage

1
2
3
4
5
6
7
8
make_item(
  scoringMatrix,
  slopes,
  intercepts,
  mode = c("sequential", "simultaneous"),
  scoringOnPreviousResponses = NULL,
  editResponse = NULL
)

Arguments

scoringMatrix

matrix describing how responses (described in rownames of the matrix) map on scores of latent traits (described in columns of the matrix)

slopes

named numeric vector of slope (discrimination) parameters with names describing latent variables matching each slope (must contain at least all the names occurring in column names of the scoringMatrix but may also contain additional slopes matching latent traits scoring patterns that will be returned by functions provided with arguments scoringOnPreviousResponses or editResponse)

intercepts

numeric vector of intercept parameters (must be shorter of one than number of rows in the \codescoringMatrix or the same length but with the first element being 0)

mode

a way the item should be answered - see generate_item_responses_sqn, generate_item_responses_sml

scoringOnPreviousResponses

optional function returning a column vector that will be put before first column of the scoringMatrix

editResponse

only if mode='sequential': optional function returning scoring matrix that should replace that provided by scoringMatrix after response is made at the first node; 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)

Value

Object of class rstylesItem representing an item. List of such objects is passed as a test specification to generate_test_responses.


rstyles documentation built on July 23, 2021, 5:07 p.m.