| GNPC | R Documentation |
Function GNPC is used to estimate examinees' attribute profiles using
the general nonparametric classification (GNPC) method
(Chiu et al., 2018; Chiu & Köhn, 2019). It can be
used with data conforming to any cognitive diagnosis models (CDMs).
GNPC(
Y,
Q,
fixed.w = FALSE,
initial.dis = "hamming",
initial.gate = "AND",
max.iter = 1000,
tol = 0.001,
track.convergence = TRUE
)
Y |
A |
Q |
A |
fixed.w |
|
initial.dis |
The type of distance used in the |
initial.gate |
The type of relation between examinees' attribute profiles
and the items.
Allowable relations are " |
max.iter |
Maximum number of iterations allowed. Default is 1000. |
tol |
Convergence tolerance. The algorithm stops when the proportion of examinees whose classification changes is less than this value. Default is 0.001. |
track.convergence |
Logical. If |
The function returns a list with the following components:
A N \times K matrix of estimated attribute profiles for examinees
A vector of length N containing the estimated class memberships
A 2^K \times J matrix of weighted ideal responses
A 2^K \times J matrix of weights used to compute the weighted ideal responses
(Only if track.convergence = TRUE) A list containing:
iteration: Vector of iteration numbers
prop.change: Proportion of examinees whose classification changed at each iteration
total.distance: Total squared distance between observed and weighted ideal responses
n.iter: Total number of iterations until convergence
converged: Logical indicating whether the algorithm converged within max.iter
A weighted ideal response \eta^{(w)}, defined as the convex combination
of \eta^{(c)} and \eta^{(d)}, is used in the GNPC method to compute distances.
Suppose item j requires K_{j}^* \leq {K} attributes that, without loss of
generality, have been moved to the first K_{j}^* positions of the item
attribute vector \boldsymbol{q_j}. For each item j and latent class \mathcal{C}_{l},
the weighted ideal response \eta_{lj}^{(w)} is defined as the convex combination
\eta_{lj}^{(w)} = w _{lj} \eta_{lj}^{(c)}+(1-w_{lj})\eta_{lj}^{(d)}
where 0\leq w_{lj}\leq 1. The distance between the observed responses
to item j and the weighted ideal responses w_{lj}^{(w)} of examinees
in \mathcal{C}_{l} is defined as the sum of squared deviations:
d_{lj} = \sum_{i \in \mathcal {C}_{l}} (y_{ij} - \eta_{lj}^{(w)})^2.
\hat{w}_{lj} can then be obtained by minimizing d_{lj}, which can then be used to compute \hat{\eta}_{lj}.
After all the \hat{\eta}_{lj} are obtained, examinees' attribute profiles \boldsymbol{\alpha}
can be estimated by minimizing the loss function \hat{d}_{lj} = \sum_{i \in \mathcal{C}_{l}} (y_{ij} - \hat{\eta}_{lj}^{(w)})^2
The algorithm iteratively updates the weighted ideal responses and reclassifies
examinees until convergence is achieved. The stopping criterion is based on the proportion
of examinees whose classification changes between consecutive iterations:
\frac{\sum_{i=1}^{N} I\left[\alpha_i^{(t)} \neq \alpha_i^{(t-1)}\right]}{N} < \epsilon
where \epsilon is the tolerance level (default = 0.001).
The default initial values of \boldsymbol{\alpha} are obtained by using the NPC method. Chiu et al. (2018)
suggested another viable alternative for obtaining initial estimates of the proficiency classes by
using an ideal response with fixed weights defined as
\eta_{lj}^{(fw)}=\frac{\sum_{k=1}^{K}\alpha_{k}q_{jk}}{K}\eta_{lj}^{(c)}+(1-\frac{\sum_{k=1}^{K}\alpha_{k}q_{jk}}{K})\eta_{lj}^{(d)}.
programs: The general nonparametric classification method. Psychometrika, 83(2), 355–375. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11336-017-9595-4")}
classification method. Psychometrika, 84(3), 830–845. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11336-019-09660-x")}
## Not run:
# Example 1: Basic usage
library(GDINA)
set.seed(123)
N <- 500
Q <- sim30GDINA$simQ
gs <- data.frame(guess = rep(0.2, nrow(Q)), slip = rep(0.2, nrow(Q)))
sim <- simGDINA(N, Q, gs.parm = gs, model = "DINA")
Y <- extract(sim, what = "dat")
alpha <- extract(sim, what = "attribute")
# Analyze data using GNPC
result <- GNPC(Y, Q, initial.dis = "hamming", initial.gate = "AND")
# View results
head(result$att.est)
table(result$class)
# Plot overall convergence
plot(result)
# Plot individual examinee's convergence
plot(result, type = "individual", examinee.id = 1, true.alpha = alpha[1, ])
# Check attribute agreement rate
PAR(alpha, result$att.est)
AAR(alpha, result$att.est)
# Example 2: Without convergence tracking (Convergence tracking is only used for the GNPC plots.)
result2 <- GNPC(Y, Q, track.convergence = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.