makeItemList {conquestr}R Documentation

makeItemList

Description

creates a list of item matrices. Each matrix represent one item's set of item parameters. The structure of the matrix is the same as used in conquestr::simplef (a matrix of k categories by four (category score, delta dot, tau, discrimination)).

Usage

makeItemList(scores = NULL, deltaDot, tau = NULL, discrim = 1)

Arguments

scores

a data frame or matrix containing category scores for each item. If NULL, it is assumed increasing integer scoring starting at 0 is used for all items (that is, the first category is scored 0, the second category is scored 1, the k^{th} category is scored k-1).

If a data frame, column labels should be "id", "itemid", "step", "score". If a matrix, the column order should be: "id", a unique item ID for each item matched with values in deltaDot; "itemid", item labels for each item (or NA); "step", an indicator of which step/item category this score represents and "score" the value for the scoring parameter associated with this category. There must be one score for each category (i.e. 2 for dichotomies and one for each of k categories for polytomies).

If a data frame, or a matrix:

  • "id" is an integer

  • "itemid" is a character string

  • "step" is an integer

  • "score" is numeric

  • The original category scores (i.e., increasing integer scoring) is preserved in the rownames of the matrix.

deltaDot

a data frame or matrix of delta dots (average item location/difficulty for each item).

If a data frame, column labels should be: "id", "itemid", "delta". "itemid" should be populated with an item label or be missing for all values. If a matrix, column order should be: "id", a unique item ID for each row; "itemid", item labels for each item (or NA); "delta", a delta dot.

If a data frame, or a matrix:

  • "id" is an integer

  • "itemid" is a character string

  • "delta" is numeric

tau

NULL if all items are dichotomies. A data frame or matrix of taus for polytomous items. Only polytomous items should be in this file. If an item ID in deltaDot in not in tau it is assumed that the item is dichotomous. The tau parameters represent the deviation from the delta dot to give the item parameters for adjacent category boundaries (e.g., delta one ( \delta_{1} = \dot{\delta} + \tau_{1} ) is the boundary between k_{1} and k_{2}, delta two ( \delta_{2} = \dot{\delta} + \tau_{2} ) is the category boundary between k_{1} and k_{2}).

Where a polytomous item has k categories, there should be k-2 rows for that item in tau. For example, a 3-category item has categories k_{1}, k_{2} and k_{3}. There will be one value in tau for this item. The value in tau represents the the first category boundary. (e.g., between k_{1} and k_{2}). The last (second in this case) category boundary is constrained to be the negative sum of the other tau values within this item (and is therefore not required in the file).

If a data frame, column labels should be "id", "itemid", "step", "tau". If a matrix, the column order should be: "id", a unique item ID for each item matched with values in deltaDot; "itemid", item labels for each item (or NA); "step", an indicator of which step/item category this threshold represents (minimum value should be 1 and maximum value should be k-1); "tau" the value for the tau parameter associated with this step.

If a data frame, or a matrix:

  • "id" is an integer

  • "itemid" is a character string

  • "step" is an integer

  • "tau" is numeric

discrim

a double, a data frame, or a matrix of item (or category) discrimination parameters. When a double is provided, the value is applied to all discrimination parameters. The default is 1. Setting the value to 1.7 is one approach to re-scale to the normal ogive metric. Otherwise a data.frame or matrix defining the discrimination parameter for each response category. If a data frame, column labels should be "id", "itemid", "step", "discrim". If step is NA and there is only one entry for an item "itemid", the discrimination is assumed to be constant for all response categories with the item. This is the case for names models like the GPCM and 2PL models, and can be a short hand way of defining the discrimination without specifying all categories. When discrimination varies across scoring categories, the bock-nominal model is implied. In the case of discrimination varying across scoring categories, all categories must be defined.

If a data frame, or a matrix:

  • "id" is an integer

  • "itemid" is a character string

  • "step" is an integer

  • "discrim" is numeric

Value

a list.

Examples

nItems <- 10
myItemsDeltaDot <- data.frame(
  id= seq(nItems),
  itemid= NA,
  delta = runif (nItems, -4, 1) # nItems items in range -4,1
)
myItemsList <- conquestr::makeItemList(deltaDot = myItemsDeltaDot)

[Package conquestr version 1.3.0 Index]