scoring: IRT person scoring

View source: R/scoring.R

scoringR Documentation

IRT person scoring

Description

Compute IRT latent scores (theta estimates). Scoring method currently supported are:

  • MMLE: marginal maximum likelihood estimation. When no Rasch testlet model item is involved, it reduces to regular MLE.

  • More methods to be added in the near future...

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

Usage

scoring(
  SA_dat = NULL,
  Cluster_dat = NULL,
  SA_parm = NULL,
  Cluster_parm = NULL,
  Dv = 1,
  n.nodes = 21,
  censor = c(-6, 6),
  correction_val = 0.5,
  SE = FALSE
)

Arguments

SA_dat

For one examinee, a vector or row matrix/dataframe of response to standalone items. Responses must follow the row order in SA_parm. Use NA for missing responses.

Cluster_dat

For one examinee, a vector or row matrix/dataframe of response to cluster items. Responses must follow the row order in Cluster_parm. Use NA for missing responses.

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

censor

when there's perfect or all wrong score, this is a 2-element vector of lower and upper limit of estimated theta for such score patterns.
NOTE: This argument only censor the estimated theta for the perfect or all wrong scores. It dose not censor possible extreme theta values estimated from other score patterns. Perform censoring after running this code if a global censorship is desired.

correction_val

a value to add or subtract when there's perfect or all wrong score to avoid extremely large theta estimate.

SE

if TRUE, returns standard error

Value

a list of scoring results, where the first element is the estimated theta.

Note

This function should be run for one examinee at a time. Use parallel processing for higher processing speed.

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)
sigma <- diag(c(1, sqrt(unique(example_Cluster_parm$cluster_var))))
mu <- rep(0, nrow(sigma))
thetas <- MASS::mvrnorm(7,mu,sigma)
thetas[,1] <- seq(-3,3,1) #overall dimension theta values
itmDat <- sim_data(thetas = thetas, SA_parm = example_SA_parm, Cluster_parm = example_Cluster_parm)
SA_dat <- itmDat[,1:20]
Cluster_dat <- itmDat[,-1:-20]
# Scoring for the first examinee
rst <- scoring(SA_dat[1,], Cluster_dat[1,], example_SA_parm, example_Cluster_parm, n.nodes = 11, SE=TRUE)
rst$par  # estimated theta
rst$SE  # estimated standard error

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