| get.PVAF | R Documentation |
The function is able to calculate the proportion of variance accounted for (PVAF) for all items
after fitting CDM or directly.
get.PVAF(Y = NULL, Q = NULL, CDM.obj = NULL, model = "GDINA")
Y |
A required |
Q |
A required binary |
CDM.obj |
An object of class |
model |
Type of model to be fitted; can be |
The intrinsic essence of the GDI index (as denoted by \zeta_{2}) is the weighted variance of
all 2^{K\ast} attribute mastery patterns' probabilities of correctly responding to
item i, which can be computed as:
\zeta^2 =
\sum_{l=1}^{2^K} \pi_{l}{(P(X_{pi}=1|\boldsymbol{\alpha}_{l}) - \bar{P}_{i})}^2
where \pi_{l} represents the prior probability of mastery pattern l;
\bar{P}_{i}=\sum_{k=1}^{2^K}\pi_{l}P(X_{pi}=1|\boldsymbol{\alpha}_{l}) is the weighted average of the correct
response probabilities across all attribute mastery patterns. When the q-vector
is correctly specified, the calculated \zeta^2 should be maximized, indicating
the maximum discrimination of the item.
Theoretically, \zeta^{2} is larger when \boldsymbol{q}_{i} is either specified correctly or over-specified,
unlike when \boldsymbol{q}_{i} is under-specified, and that when \boldsymbol{q}_{i} is over-specified, \zeta^{2}
is larger than but close to the value of \boldsymbol{q}_{i} when specified correctly. The value of \zeta^{2} continues to
increase slightly as the number of over-specified attributes increases, until \boldsymbol{q}_{i} becomes \boldsymbol{q}_{i1:K}
(\boldsymbol{q}_{i1:K} = [11...1]).
Thus, \zeta^{2} / \zeta_{max}^{2} is computed to indicate the proportion of variance accounted for by \boldsymbol{q}_{i},
called the PVAF.
An object of class matrix, which consisted of PVAF for each item and each possible q-vector.
Haijiang Qin <Haijiang133@outlook.com>
de la Torre, J., & Chiu, C. Y. (2016). A General Method of Empirical Q-matrix Validation. Psychometrika, 81(2), 253-273. DOI: 10.1007/s11336-015-9467-8.
validation
library(Qval)
set.seed(123)
## generate Q-matrix and data
K <- 3
I <- 20
Q <- sim.Q(K, I)
IQ <- list(
P0 = runif(I, 0.0, 0.2),
P1 = runif(I, 0.8, 1.0)
)
data <- sim.data(Q = Q, N = 500, IQ = IQ, model = "GDINA", distribute = "horder")
## calculate PVAF directly
PVAF <-get.PVAF(Y = data$dat, Q = Q)
print(PVAF)
## calculate PVAF after fitting CDM
CDM.obj <- CDM(data$dat, Q, model="GDINA")
PVAF <-get.PVAF(CDM.obj = CDM.obj)
print(PVAF)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.