| Title: | Stochastic EM Algorithm for High-Dimensional Cognitive Diagnosis Models |
|---|---|
| Description: | Provides stochastic expectation-maximization (stEM) algorithms for estimating high-dimensional cognitive diagnosis models. The package implements stochastic EM algorithms for cognitive diagnosis models with a large number of attributes. It includes estimation functions and example datasets for model fitting and analysis. The methods are described in Ma, W., Wang, K., and Xu, G. (Accepted). "Parameter estimation of cognitive diagnosis models with stochastic EM algorithm." Behaviometrika. |
| Authors: | Yuxuan Mei [aut, cre], Wenchao Ma [aut], Kevin Wang [aut], Gongjun Xu [aut] |
| Maintainer: | Yuxuan Mei <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-09-24 09:43:13 UTC |
| Source: | https://github.com/cran/HighDimenCDM |
Computes variance of parameter estimates across batches in the stochastic EM algorithm.
batch.var(plist, n)batch.var(plist, n)
plist |
A list of parameter estimates collected across batches. |
n |
Number of batches |
A vector of batch variance estimates.
Wenchao Ma, The University of Minnesota, [email protected]
The IPIP-NEO-120 data are based on the public-domain personality inventory developed from the International Personality Item Pool (IPIP; Johnson, 2014).
IPIPIPIP
A list of responses and Q-matrix with components:
datResponses of 4271 participants to 120 items.
QThe Q-matrix.
The data consist of responses from 4271 participants to 120 dichotomized items and the corresponding Q-matrix relating the 120 items to 30 personality facets.
Yuxuan Mei, The University of Minnesota, [email protected]
Johnson, J. A. (2014). Measuring thirty facets of the five factor model with a 120-item public domain inventory: Development of the ipip-neo-120. Journal of Research in Personality, 51, 78–89.
Performs Gibbs sampling updates of attribute profiles and item parameters within the stochastic EM algorithm.
kernel(dat, Q, J, reduced.profiles, alpha, B, ip.only = TRUE)kernel(dat, Q, J, reduced.profiles, alpha, B, ip.only = TRUE)
dat |
A required |
Q |
A required |
J |
The number of items. |
reduced.profiles |
A list of reduced attribute profiles for each item. |
alpha |
The initial latent attribute profiles. |
B |
The number of Gibbs sampling iterations. |
ip.only |
If |
a list with elements
estimated item parameters from Gibbs sampling iterations
latent attribute profiles from the final Gibbs sampling iteration
saved latent attribute profiles across Gibbs sampling iterations
final item parameter estimates
Wenchao Ma, The University of Minnesota, [email protected]
Simulated responses for 2000 examinees generated with the script in 'data-raw/simN2000K10.R' using 'GDINA::simGDINA()'.
simN2000K10simN2000K10
A list with components:
dataA response matrix.
QThe Q-matrix used for simulation.
true.paramsThe true item category response probabilities used to generate the data.
data(simN2000K10) str(simN2000K10)data(simN2000K10) str(simN2000K10)
Simulated responses for 2000 examinees generated with the script in 'data-raw/simN2000K15.R' using 'GDINA::simGDINA()'.
simN2000K15simN2000K15
A list with components:
dataA response matrix.
QThe Q-matrix used for simulation.
true.paramsThe true item category response probabilities used to generate the data.
data(simN2000K15) str(simN2000K15)data(simN2000K15) str(simN2000K15)
Simulated responses for 2000 examinees generated with the script in 'data-raw/simN2000K20.R' using 'GDINA::simGDINA()'.
simN2000K20simN2000K20
A list with components:
dataA response matrix.
QThe Q-matrix used for simulation.
true.paramsThe true item category response probabilities used to generate the data.
data(simN2000K20) str(simN2000K20)data(simN2000K20) str(simN2000K20)
Estimates model parameters for cognitive diagnosis models using the stochastic expectation-maximization (stEM) algorithm with sequential Gibbs sampling.
stEM( dat, Q, item.parm = NULL, maxitr = 100, eps1 = 2, eps2 = 0.4, frac1 = 0.1, frac2 = 0.5, verbose = FALSE )stEM( dat, Q, item.parm = NULL, maxitr = 100, eps1 = 2, eps2 = 0.4, frac1 = 0.1, frac2 = 0.5, verbose = FALSE )
dat |
A required |
Q |
A required |
item.parm |
Optional initial item parameter estimates. |
maxitr |
Maximum number of iterations. |
eps1 |
A positive convergence criterion used during the burn-in stage of the stochastic EM algorithm. |
eps2 |
A positive convergence criterion used after the burn-in. |
frac1 |
Proportion of the first part of the Markov chain used in the Geweke diagnostic. |
frac2 |
Proportion of the last part of the Markov chain used in the Geweke diagnostic. |
verbose |
Logical; if TRUE, prints progress messages during the estimation process. |
a list with elements
estimated item category response probabilities
estimated final item parameters obtained by averaging across retained batches
estimated attribute mastery profiles
attribute mastery profile estimates from each retained batch
total number of retained batches used for estimation
final length of the Markov chain
the number of burn-in iterations discarded
estimated item parameters from each retained batch
dat <- simN2000K20$data Q <- simN2000K20$Q fit <- stEM(dat = dat, Q = Q) fitdat <- simN2000K20$data Q <- simN2000K20$Q fit <- stEM(dat = dat, Q = Q) fit
In this study, we analyze the responses of 719 college students (34.6% men, 83.9% White, and 16.3% first-year students) to 40 items measuring mental health problems such as alcohol-related problems, anxiety, hostility, and depression.
Tan2023Tan2023
A list of responses and Q-matrix with components:
datResponses of 719 participants to 40 items.
QThe Q-matrix.
The data were previously analyzed in Tan et al. (2022). The items measure four attributes: alcohol-related problems, anxiety, hostility, and depression.
Yuxuan Mei, The University of Minnesota, [email protected]
Tan, Z., de la Torre, J., Ma, W., Huh, D., Larimer, M. E., & Mun, E.-Y. (2022). A tutorial on cognitive diagnosis modeling for characterizing mental health symptom profiles using existing item responses. Prevention Science.
data(Tan2023) str(Tan2023) fit <- stEM( dat = Tan2023$dat, Q = Tan2023$Q )data(Tan2023) str(Tan2023) fit <- stEM( dat = Tan2023$dat, Q = Tan2023$Q )