theta_EAP {TestDesign} | R Documentation |
(C++) Calculate a theta estimate using EAP (expected a posteriori) method
Description
theta_EAP()
and theta_EAP_matrix()
are functions for calculating a theta estimate using EAP (expected a posteriori) method.
Usage
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 |
ncat |
a vector containing the number of response categories of each item. |
model |
a vector indicating item models of each item, using
|
prior |
an integer indicating the type of prior distribution, using
|
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))