zTNR: Calculate True-Negative Rate (TNR)

View source: R/QvalIndex.R

zTNRR Documentation

Calculate True-Negative Rate (TNR)

Description

Calculate True-Negative Rate (TNR)

Usage

zTNR(Q.true, Q.orig, Q.sug)

Arguments

Q.true

The true Q-matrix.

Q.orig

The Q-matrix need to be validated.

Q.sug

The Q-matrix that has been validated.

Details

TNR is defined as the proportion of correct elements which are correctly retained:

TNR = \frac{\sum_{i=1}^{I}\sum_{k=1}^{K}I(q_{ik}^{t} = q_{ik}^{s} | q_{ik}^{t} \neq q_{ik}^{o})} {\sum_{i=1}^{I}\sum_{k=1}^{K}I(q_{ik}^{t} \neq q_{ik}^{o})}

where q_{ik}^{t} denotes the kth attribute of item i in the true Q-matrix (Q.true), q_{ik}^{o} denotes kth attribute of item i in the original Q-matrix(Q.orig), q_{ik}^{s} denotes kth attribute of item i in the suggested Q-matrix(Q.sug), and I(\cdot) is the indicator function.

Value

A numeric (TNR index).

Examples

library(Qval)

set.seed(123)

Q1 <- sim.Q(5, 30)
Q2 <- sim.MQ(Q1, 0.1)
Q3 <- sim.MQ(Q1, 0.05)
TNR <- zTNR(Q1, Q2, Q3)

print(TNR)


Qval documentation built on June 8, 2025, 10:20 a.m.

Related to zTNR in Qval...