plot.irtc: Diagnostic Plots for Fitted Item Response Models

View source: R/irtc_plot.R

plot.irtcR Documentation

Diagnostic Plots for Fitted Item Response Models

Description

Base-graphics plots for a fitted model: "wright" (item difficulty vs person ability map), "ability" (person ability histogram, one panel per dimension), "quality" (item quality rating summary) and "icc" (item characteristic curves; unidimensional models only). The same figures are embedded in irtc_report reports.

Usage

## S3 method for class 'irtc'
plot(x, type = c("wright", "ability", "quality", "icc"),
    lang = irtc_lang(), items = NULL, resp = NULL, ...)

Arguments

x

A fitted irtc model object.

type

Plot type; see Description.

lang

Label language, "zh" or "en". Chinese labels require a CJK-capable graphics font.

items

For type = "icc": item indices or names to plot (default: the first 12 items).

resp

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

...

Ignored.

Value

Invisibly, x.

See Also

irtc, irtc_report

Examples

set.seed(1)
theta <- rnorm(150)
resp <- as.data.frame(sapply(seq(-1, 1, length.out = 5), function(b) {
    as.numeric(runif(150) < plogis(theta - b))
}))
mod <- irtc(resp, model = "1PL", verbose = FALSE)
plot(mod, type = "wright", lang = "en")
plot(mod, type = "icc", lang = "en", items = 1:2)

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