| QR | R Documentation |
The QR function refines a provisional Q-matrix by minimizing the residual sum of squares (RSS)
between the observed and ideal item responses across all possible q-vectors, given the estimates of
examinees' attribute profiles.
QR(Y, Q, gate = c("AND", "OR"), max.ite = 50)
Y |
A |
Q |
A |
gate |
A string, " |
max.ite |
The number of iterations to run until the RSS's of all items are stationary. |
This function implements the Q-matrix refinement (QR) method developed by Chiu
(2013). The NPC method (Chiu & Douglas, 2013) is first used to classify examinees and the best q-vector
for an item is identified by minimizing its RSS. Specifically, the RSS of
item j for examinee i is defined as
RSS_{j} =\sum_{m=1}^{2^K} \sum_{i \in C_{m}} (Y_{ij} - \eta_{jm})^2,
where C_m for m = 1, \ldots, 2^K is the mth proficiency class, and N
is the number of examinees. Chiu (2013) proved that the expected value of
RSS_j corresponding to the correct q-vector is the minimum among the
2^K - 1 candidates.
A list containing:
initial.class |
Initial classifications of examinees |
terminal.class |
Terminal classification of examinees |
modified.Q |
The modified Q-matrix |
modified.entries |
The modified q-entries |
Chiu, C. Y. (2013). Statistical Refinement of the Q-matrix in Cognitive Diagnosis. Applied Psychological Measurement, 37(8), 598-618. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1177/0146621613488436")}
NPC
## Not run:
## Generate data
library(GDINA)
N = 500
Q = sim30GDINA$simQ
J = nrow(Q)
K= ncol(Q)
gs = data.frame(guess = rep(0.2,J), slip = rep(0.2,J))
sim = simGDINA(N, Q, gs.parm = gs, model = "DINA")
Y = extract(sim,what = "dat")
## Randomly generate a misspecified Q with 20% of misspecifications
mis.Q = matrix(0, J, K)
while (any(rowSums(mis.Q)==0)==T){
mis.q = sample(J*K, J*K*0.2) ## percentage of misspecified q
ind = arrayInd(mis.q, dim(Q))
mis.Q = Q
mis.Q[ind] = 1-mis.Q[ind]
}
## Refine the misspecified Q-matrix
ref = QR(Y, mis.Q)
ref.Q = ref$modified.Q
## Compute the entry-wise and item-wise recovery rates
rr = RR(ref.Q, Q)
rr$entry.wise
rr$item.wise
## Compute the retention rate
retention.rate(ref.Q, mis.Q, Q)
## Compute the correction rate
correction.rate(ref.Q, mis.Q, Q)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.