irtc_quality: Plain-Language Item Quality Ratings

View source: R/irtc_quality.R

irtc_qualityR Documentation

Plain-Language Item Quality Ratings

Description

Combines classical difficulty and discrimination (irtc_ctt) with IRT item fit (irtc_itemfit) into a four-level quality rating per item - "good", "acceptable", "review", "revise" - with bilingual reasons and advice that non-specialists can act on. Negative discrimination (usually a wrong answer key) always leads to "revise".

Usage

irtc_quality(mod, resp = NULL, thresholds = NULL)

irtc_quality_thresholds()

## S3 method for class 'irtc_quality'
print(x, lang = irtc_lang(), ...)

Arguments

mod

A fitted irtc model object.

resp

The response data; only needed when the model object does not store it (streaming engine).

thresholds

An optional named list overriding entries of irtc_quality_thresholds(): p_hard (default 0.10), p_easy (0.95), discr_poor (0.15), discr_weak (0.25), fit_mild (c(0.70, 1.30)), fit_severe (c(0.50, 1.50)).

x

An irtc_quality object.

lang

Output language, "zh" or "en".

...

Ignored.

Value

A data frame of class irtc_quality with columns item, N, pvalue, discr, outfit, infit, rating, reasons_en, reasons_zh, advice_en, advice_zh, and attributes alpha (Cronbach's alpha) and thresholds. irtc_quality_thresholds() returns the default threshold list.

See Also

irtc, irtc_excel

Examples

set.seed(1)
theta <- rnorm(300)
resp <- as.data.frame(sapply(seq(-1, 1, length.out = 6), function(b) {
    as.numeric(runif(300) < plogis(theta - b))
}))
resp$noise <- rbinom(300, 1, 0.5)  # a broken item
mod <- irtc.mml(resp = resp, verbose = FALSE)
qual <- irtc_quality(mod)
qual[, c("item", "pvalue", "discr", "rating")]
print(qual, lang = "en")

IRTC documentation built on July 24, 2026, 5:07 p.m.