get.PVAF {Qval}R Documentation

Calculate PVAF

Description

The function is able to caculate the proportion of variance accounted for (PVAF) for all items after fitting CDM or directly.

Usage

get.PVAF(Y = NULL, Q = NULL, CDM.obj = NULL, model = "GDINA")

Arguments

Y

A required N × I matrix or data.frame consisting of the responses of N individuals to I items. Missing values should be coded as NA.

Q

A required binary I × K matrix containing the attributes not required or required, coded as 0 or 1, to master the items. The ith row of the matrix is a binary indicator vector indicating which attributes are not required (coded as 0) and which attributes are required (coded as 1) to master item i.

CDM.obj

An object of class CDM.obj. Can can be NULL, but when it is not NULL, it enables rapid verification of the Q-matrix without the need for parameter estimation. @seealso CDM.

model

Type of model to be fitted; can be "GDINA", "LCDM", "DINA", "DINO", "ACDM", "LLM", or "rRUM". Default = "GDINA".

Details

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|\mathbf{\alpha}_{l}) - P_{i}^{mean})}^2

where \pi_{l} represents the prior probability of mastery pattern l; P_{i}^{mean}=\sum_{k=1}^{2^K}\pi_{l}P(X_{pi}=1|\mathbf{\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 \mathbf{q}_{i} is either specified correctly or over-specified, unlike when \mathbf{q}_{i} is under-specified, and that when \mathbf{q}_{i} is over-specified, \zeta^{2} is larger than but close to the value of \mathbf{q}_{i} when specified correctly. The value of \zeta^{2} continues to increase slightly as the number of over-specified attributes increases, until \mathbf{q}_{i} becomes \mathbf{q}_{i1:K}. Thus, \zeta^{2} / \zeta_{max}^{2} is computed to indicate the proportion of variance accounted for by \mathbf{q}_{i} , called the PVAF.

Value

An object of class matrix, which consisted of PVAF for each item and each possible attribute mastery pattern.

Author(s)

Haijiang Qin <Haijiang133@outlook.com>

References

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.

See Also

validation

Examples

library(Qval)

set.seed(123)

## generate Q-matrix and data
K <- 3
I <- 20
example.Q <- sim.Q(K, I)
IQ <- list(
  P0 = runif(I, 0.0, 0.2),
  P1 = runif(I, 0.8, 1.0)
)
example.data <- sim.data(Q = example.Q, N = 500, IQ = IQ, model = "GDINA", distribute = "horder")

## calculate PVAF directly
PVAF <-get.PVAF(Y = example.data$dat, Q = example.Q)
print(PVAF)

## caculate PVAF after fitting CDM
example.CDM.obj <- CDM(example.data$dat, example.Q, model="GDINA")
PVAF <-get.PVAF(CDM.obj = example.CDM.obj)
print(PVAF)


[Package Qval version 0.1.7 Index]