utility: A utility function computing some commonly used values in IRT

View source: R/utility.R

utilityR Documentation

A utility function computing some commonly used values in IRT

Description

Compute some commonly used values in IRT such as probability of correct response, expected item scores, and item information. Use what argument to specify one or more results to return. See Value section for details.

Run '?MIRTutils-package' for more details, such as the context of the current package and models supported.

Usage

utility(
  theta,
  SA_parm = NULL,
  Cluster_parm = NULL,
  Dv = 1,
  n.nodes = 50,
  what = c("prob", "escore", "iteminfo", "mprob")
)

Arguments

theta

a scalar or a vector of examinee ability

SA_parm

a matrix or dataframe of item parameters for standalone items, where columns are a (slope), b1, b2, ..., b_k (difficulty or step difficulty), g (guessing), ItemID, and AssertionID. Columns must follow the above order. See example_SA_parm for an example. Use ?example_SA_parm for detailed column descriptions

Cluster_parm

a matrix or dataframe of item parameters for cluster items, where columns are a (slope), b (difficulty), cluster variance, cluster position, ItemID, and AssertionID. Columns must follow the above order. See example_Cluster_parm for an example. Use ?example_Cluster_parm for detailed column descriptions

Dv

scaling factor for IRT model (usually 1 or 1.7)

n.nodes

number of nodes used when integrating out the nuisance dimension

what

a character vector specifying what to compute. Possible values are "prob", "escore", "iteminfo", and "mprob". See Value section for details.

Value

A list of results specified in what:

  • prob: probability of correct response. When Rasch testlet model is involved, this is conditional probability given both overall and each node of the nuisance dimension

  • escore: expected item score

  • iteminfo: item information. When Rasch testlet model is involved, this is item info based on marginal prob of raw scores calculated using Lord-Wingerskey algorithm

  • mprob: When Rasch testlet model is involved, this is the marginal probability of correct response for each assertion. For unidimensional models, this is the same as prob

Note

If the test does not have SA items or Cluster items, use default (NULL) for the corresponding data and parameter arguments.

Author(s)

Zhongtian Lin lzt713@gmail.com

Examples

data(example_SA_parm)
data(example_Cluster_parm)
theta <- seq(-3,3,1)
rst <- utility(theta, example_SA_parm, example_Cluster_parm, n.nodes = 11)

woshikaqia/MIRTutils documentation built on Aug. 21, 2024, 4:30 p.m.