Bock-Aitkin marginal maximum likelihood: the E-step computes each
respondent's posterior over a fixed normal quadrature grid; the
M-step refits each item's discrimination/difficulty by weighted
logistic Newton-Raphson on the expected counts. Abilities are
returned as EAP scores.
Usage
morie_irt_2pl(responses, n_quad = 41L, max_iter = 200L, tol = 1e-06)
Arguments
- responses
A 0/1 matrix or data frame (rows = persons,
columns = items). NAs are allowed and are ignored item-wise.
- n_quad
Number of quadrature points (default 41).
- max_iter
Maximum EM iterations.
- tol
Convergence tolerance on the marginal log-likelihood.
Value
An object of class morie_irt_2pl: a list with
discrimination (a), difficulty (b), loglik,
n_iter, converged, theta (EAP scores),
theta_se, n_persons, n_items, method.
References
Bock, R. D., & Aitkin, M. (1981). Marginal maximum
likelihood estimation of item parameters. Psychometrika,
46(4), 443–459.
Examples
set.seed(1)
th <- rnorm(300)
a <- c(1, 1.5, 0.8); b <- c(-0.5, 0, 0.5)
X <- sapply(1:3, function(j) rbinom(300, 1, plogis(a[j] * (th - b[j]))))
fit <- morie_irt_2pl(X)
fit$difficulty
#> [1] -0.6070728 0.1007451 0.4328851