theta_EAP function

(C++) Calculate a theta estimate using EAP (expected a posteriori) method

(C++) Calculate a theta estimate using EAP (expected a posteriori) method

theta_EAP() and theta_EAP_matrix() are functions for calculating a theta estimate using EAP (expected a posteriori) method.

theta_EAP(theta_grid, item_parm, resp, ncat, model, prior, prior_parm) theta_EAP_matrix(theta_grid, item_parm, resp, ncat, model, prior, prior_parm)

Arguments

  • theta_grid: theta quadrature points.

  • item_parm: a matrix containing item parameters.

  • resp: responses on each item. Must be a vector for theta_EAP(), and a matrix for theta_EAP_matrix(). Each row should represent an examinee.

  • ncat: a vector containing the number of response categories of each item.

  • model: a vector indicating item models of each item, using

    • 1: 1PL model
    • 2: 2PL model
    • 3: 3PL model
    • 4: PC model
    • 5: GPC model
    • 6: GR model
  • prior: an integer indicating the type of prior distribution, using

    • 1: normal distribution
    • 2: uniform distribution
  • prior_parm: a vector containing parameters for the prior distribution.

Details

theta_EAP() and theta_EAP_matrix() are designed for multiple items.

theta_EAP() is designed for one examinee, and theta_EAP_matrix() is designed for multiple examinees.

Currently supports unidimensional models.

Examples

# item parameters item_parm <- matrix(c( 1, NA, NA, 1, 2, NA, 1, 2, 0.25, 0, 1, NA, 2, 0, 1, 2, 0, 2), nrow = 6, byrow = TRUE ) ncat <- c(2, 2, 2, 3, 3, 3) model <- c(1, 2, 3, 4, 5, 6) # simulate response item_parm <- as.data.frame(item_parm) item_parm <- cbind(101:106, 1:6, item_parm) pool <- loadItemPool(item_parm) true_theta <- seq(-3, 3, 1) resp <- simResp(pool, true_theta) theta_grid <- matrix(seq(-3, 3, .1), , 1) theta_EAP(theta_grid, pool@ipar, resp[1, ], ncat, model, 1, c(1, 2)) theta_EAP_matrix(theta_grid, pool@ipar, resp, ncat, model, 1, c(1, 2))
  • Maintainer: Seung W. Choi
  • License: GPL (>= 2)
  • Last published: 2024-08-22