| fit.FCDCM | R Documentation |
Fits a higher-order cognitive diagnostic model for forced-choice (paired-
comparison) data. Each block presents two statements, and the respondent
selects the one they agree with more. The discrete attribute mastery
profile \boldsymbol{\alpha}_j for each person is marginalized over
all 2^D possible patterns, linking a continuous higher-order latent
trait \theta_j to the DCM condensation rule at the statement level.
fit.FCDCM(
data,
Q.matrix,
block.items = NULL,
dcm.type = "DINA",
method = c("iStEM", "stan"),
control.model = NULL,
control.method = NULL
)
data |
An |
Q.matrix |
An |
block.items |
A list of length |
dcm.type |
Character vector (length 1 or |
method |
Estimation method: |
control.model |
A named list of model-level hyperparameters for the higher-order DCM. Supported entries:
|
control.method |
A named list of method-specific tuning parameters. Common entries (used by both Stan and iStEM):
Stan-specific entries:
iStEM-specific entries:
|
An object of class "FCDCM" containing:
nparNumber of free parameters (2D + 2B).
method"stan" or "iStEM".
thetaList with est, se, Rhat
(N \times 1); higher-order trait estimates.
deltaList with est, se, Rhat
(D \times 2); higher-order \delta_1, \delta_0
parameters.
parList with est, se, Rhat
(B \times 2); block response parameters
eta0 and etaAB.
alphaList with est, se, Rhat, and
prob; est is the binary classified attribute profile
(N \times D) and prob contains posterior mastery
probabilities.
class.postPosterior probabilities for all 2^D
attribute profiles.
alpha.patterns, zeta.patternsFull enumeration of attribute mastery patterns and their condensation outputs.
logLikMarginal log-likelihood (class "logLik").
Higher-order latent structure.
A unidimensional continuous trait \theta_j \sim N(0, 1) governs the
probability of mastering each attribute d = 1, \dots, D:
P(\alpha_{jd} = 1 \mid \theta_j) =
\frac{1}{1 + \exp\bigl[-\bigl(\delta_{1d}\,\theta_j - \delta_{1d}\,\delta_{0d}\bigr)\bigr]},
where \delta_{1d} > 0 is the discrimination and
\delta_{0d} is the difficulty (threshold) for attribute d.
Attributes are conditionally independent given \theta_j.
Statement-level condensation.
For each statement i = 1, \dots, I with Q-vector
\mathbf{q}_i = (q_{i1}, \dots, q_{iD})', the latent mastery status
\zeta_{ij} \in \{0, 1\} is determined by one of two condensation
rules:
DINA (conjunctive):
\zeta_{ij} = \prod_{d: q_{id} = 1} \alpha_{jd}.
All required attributes must be mastered.
DINO (disjunctive):
\zeta_{ij} = 1 - \prod_{d: q_{id} = 1} (1 - \alpha_{jd}).
At least one required attribute must be mastered.
Forced-choice block response.
Block b consists of two statements (A_b, B_b). The probability
that the respondent selects statement A_b over B_b follows
the original FC-DCM specification and fixes equal-condensation
probabilities to chance:
P(\text{choose } A_b \mid \zeta_{A_b}, \zeta_{B_b}) =
\begin{cases}
\eta_{0b}, & \text{if } \zeta_{A_b} < \zeta_{B_b}, \\
0.5, & \text{if } \zeta_{A_b} = \zeta_{B_b}, \\
0.5+\eta_{ABb}, & \text{if } \zeta_{A_b} > \zeta_{B_b}.
\end{cases}
with 0 < \eta_{0b} < 0.5 and 0 < \eta_{ABb} < 0.5. Thus
equal statement-level mastery produces chance choice, choosing the lower
mastery statement has probability \eta_{0b}, and choosing the higher
mastery statement has probability 0.5+\eta_{ABb}. The probability
of choosing B_b is the complement.
The marginal likelihood integrates over all 2^D attribute patterns:
P(\mathbf{Y}_j \mid \theta_j) =
\sum_{\boldsymbol{\alpha} \in \{0,1\}^D}
P(\boldsymbol{\alpha} \mid \theta_j) \times
\prod_{b=1}^{B} P(Y_{jb} \mid \zeta_{A_b}, \zeta_{B_b}).
A block with \zeta_{A_b}=\zeta_{B_b} contributes no direct
information for distinguishing the two equal condensation states
(both are fixed at 0.5). For single-attribute statements and D=2,
if all blocks compare the same ordered attribute pair, the response
distribution distinguishes 10 from 01 but leaves 00
and 11 to be separated only by the higher-order structural model.
Good global fit can therefore coexist with weak profile classification.
A forced-choice Q/block design should provide repeated cross-attribute
comparisons, avoid pairing statements with identical Q-vectors, and keep
each attribute represented in both statement positions. A practical
numerical target, consistent with the original FC-DCM simulation logic, is
that each attribute appears multiple times as the first/predominant
statement and multiple times as the second/inferior statement, with
comparisons distributed across different attribute pairs. The automatic
simulator uses this balanced assembly rule when block.items is not
supplied.
method = "stan"):Full Bayesian inference via HMC. The discrete attribute profile is exactly marginalized in the Stan likelihood.
method = "iStEM"):Improved Stochastic EM. Person sampling considers the joint space of
\theta_j and \boldsymbol{\alpha}_j. Parameter updates
use closed-form or numerical optimization steps.
de la Torre, J., & Douglas, J. A. (2004). Higher-order latent trait models for cognitive diagnosis. Psychometrika, 69(3), 333–353. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/BF02295640")}
Junker, B. W., & Sijtsma, K. (2001). Cognitive assessment models with few assumptions, and connections with nonparametric item response theory. Applied Psychological Measurement, 25(3), 258–272.
sim.data.FCDCM, get.fit.index.FCDCM,
logLik.FCDCM
sim <- sim.data.FCDCM(N.person = 20, N.block = 3, D = 2,
dcm.type = "DINA")
fit <- fit.FCDCM(sim$data, Q.matrix = sim$Q.matrix,
block.items = sim$block.items,
dcm.type = "DINA", method = "iStEM",
control.method = list(
seed = 123, vis = FALSE,
M = 2, B = 2, burnin.maxitr = 2,
maxitr = 3, eps1 = 10, eps2 = 10,
estimate.se = FALSE))
head(fit$alpha$est) # binary attribute profiles (0/1)
head(fit$alpha$prob) # marginal mastery probabilities
gof <- get.fit.index(fit)
summary(gof)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.