get.beta: Calculate beta

View source: R/IndexBeta.R

get.betaR Documentation

Calculate \beta

Description

The function is able to calculate the \beta index for all items after fitting CDM or directly.

Usage

get.beta(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 N × I items. Missing values need to be coded as NA.

Q

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

CDM.obj

An object of class CDM.obj. Can be NULL, but when it is not NULL, it enables rapid validation 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

For item i with the q-vector of the c-th (c = 1, 2, ..., 2^{K}) type, the \beta index is computed as follows:

\beta_{ic} = \sum_{l=1}^{2^K} \left| \frac{r_{li}}{n_l} P_{ic}(\boldsymbol{\alpha}_{l}) - \left(1 - \frac{r_{li}}{n_l}\right) \left[1 - P_{ic}(\boldsymbol{\alpha}_{l})\right] \right| = \sum_{l=1}^{2^K} \left| \frac{r_{li}}{n_l} - \left[1 - P_{ic}(\boldsymbol{\alpha}_{l}) \right] \right|

In the formula, r_{li} represents the number of examinees in attribute mastery pattern \boldsymbol{\alpha}_{l} who correctly answered item i, while n_l is the total number of examinees in attribute mastery pattern \boldsymbol{\alpha}_{l}. P_{ic}(\boldsymbol{\alpha}_{l}) denotes the probability that an examinee in attribute mastery pattern \boldsymbol{\alpha}_{l} answers item i correctly when the q-vector for item i is of the c-th type. In fact, \frac{r_{li}}{n_l} is the observed probability that an examinee in attribute mastery pattern \boldsymbol{\alpha}_{l} answers item i correctly, and \beta_{jc} represents the difference between the actual proportion of correct answers for item i in each attribute mastery pattern and the expected probability of answering the item incorrectly in that state. Therefore, to some extent, \beta_{jc} can be considered as a measure of discriminability.

Value

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

Author(s)

Haijiang Qin <Haijiang133@outlook.com>

References

Li, J., & Chen, P. (2024). A new Q-matrix validation method based on signal detection theory. British Journal of Mathematical and Statistical Psychology, 00, 1–33. DOI: 10.1111/bmsp.12371

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)
)

model <- "DINA"
example.data <- sim.data(Q = example.Q, N = 500, IQ = IQ, model = model, distribute = "horder")

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

## calculate beta after fitting CDM
example.CDM.obj <- CDM(example.data$dat, example.Q, model=model)
beta <-get.beta(CDM.obj = example.CDM.obj)
print(beta)


Qval documentation built on April 3, 2025, 6:20 p.m.

Related to get.beta in Qval...