| ForceChoice-package | R Documentation |
The ForceChoice package provides a unified framework for fitting, simulating, and evaluating forced-choice and traditional item response models. It supports eight model families spanning dominance (MIRT), ideal-point/unfolding (MGGUM), polytomous (MGPCM), and forced-choice (FCMIRT, FCGGUM, TIRT, FCDCM, FCGDINA) paradigms, with full Bayesian estimation via Stan, fast improved stochastic EM (iStEM), and a deterministic EM backend for FCGDINA.
Traditional (single-stimulus) models:
fit.MIRTMultidimensional IRT (1PL–4PL). Binary responses with optional Q-matrix structure.
fit.MGPCMMultidimensional Generalized Partial Credit Model. Polytomous ordered-category responses.
fit.MGGUMMultidimensional Generalized Graded Unfolding Model. Ideal-point polytomous responses.
Forced-choice (comparative) models:
fit.FCMIRTForced-choice MIRT. Item-level dominance model with sequential ranking over item endorsement logits at the block level.
fit.FCGGUMForced-choice GGUM. Item-level ideal-point model with sequential ranking over binary GGUM endorsement logits.
fit.TIRTThurstonian IRT for forced-choice. Pairwise probit comparison of latent utility differences.
fit.FCDCMForced-choice DCM. Higher-order cognitive diagnostic model with exact attribute-profile marginalization.
fit.FCGDINAForced-choice GDINA. General CDM item-response structure with forced-choice block likelihood.
Model families support a common estimation interface:
method = "stan"):Full Bayesian inference via Hamiltonian Monte Carlo
(NUTS/HMC). Provides posterior means, standard deviations,
and convergence diagnostics (\hat{R}).
method = "iStEM"):Improved Stochastic EM (iStEM) algorithm combining finite-grid block Gibbs person sampling with L-BFGS-B item-parameter optimization. Scales well to moderate data sets.
method = "EM"):Deterministic posterior-weight EM for FCGDINA. Useful as a reproducible baseline or fast diagnostic estimator.
A typical analysis follows four steps:
Simulate (or load) data with sim.data.*().
Fit a model with fit.*().
Rotate the solution if needed with
the rotate S3 generic.
Evaluate fit with get.fit.index()
and summary.good.of.fit().
The package uses the limited-information M2 framework
(Maydeu-Olivares & Joe, 2005, 2006) implemented in
good.of.fit. Fit indices include:
Information criteria: AIC, AICc, BIC, CAIC, SABIC, HQIC
Absolute fit: M2, RMSEA (with CI), SRMSR, McDonald NCI
Comparative fit: CFI, TLI, IFI
Pseudo-R^2: McFadden, Cox–Snell, Nagelkerke, etc.
Local dependence: Yen's Q3 (raw and adjusted)
Classification: posterior entropy, mean max posterior
The package is designed so that simulation, estimation, extraction, and
model checking can be scripted end to end. Simulation functions return the
true parameters and the effective call arguments; fitted objects retain the
original input arguments, estimates, convergence diagnostics, and
likelihood-related quantities used by logLik and
get.fit.index. For computationally expensive Stan or iStEM
workflows, manuscript replication code should set seeds explicitly and use
a small demonstration configuration in addition to any full-scale analysis.
Maintainer: Haijiang Qin haijiang133@outlook.com (ORCID) [copyright holder]
Authors:
Haijiang Qin haijiang133@outlook.com (ORCID) [copyright holder]
Lei Guo happygl1229@swu.edu.cn (ORCID) [copyright holder]
set.seed(123)
sim <- sim.data.FCGDINA(N.person = 12, N.block = 2, I.block = 2,
D = 2, model = "DINA")
str(sim$response)
head(sim$Q.matrix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.