irtc_report: Generate a Word or HTML Analysis Report

View source: R/irtc_report.R

irtc_reportR Documentation

Generate a Word or HTML Analysis Report

Description

Writes an analysis report with figures (Wright map, ability distribution, item quality summary, item characteristic curves) and tables. Three audience layouts are available: "decision" (a short executive summary with recommendations), "survey" (a plain-language full report) and "stat" (a complete technical report including item parameters, item fit and model information). Every layout includes a Model diagnostics section (convergence, information criteria with interpretation, EAP reliability band, item-fit reading) and a Data processing transparency section (weights summary, Q-matrix item alignment, unobserved-category collapses, dropped items, scoring summary, and - for "stat"/"survey" - the full cleaning log), detailed for statisticians and condensed for other audiences.

HTML reports are fully self-contained single files (images embedded); Word reports require the optional officer package.

Usage

irtc_report(mod, file, format = NULL,
    audience = c("survey", "decision", "stat"), lang = irtc_lang(),
    resp = NULL, title = NULL, overwrite = FALSE, verbose = TRUE)

Arguments

mod

A fitted irtc model object.

file

Output file path ending in .docx or .html.

format

"docx" or "html"; inferred from file when NULL.

audience

Report layout; see Description.

lang

Output language, "zh" or "en".

resp

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

title

Report title; a bilingual default is used when NULL.

overwrite

Logical: overwrite an existing file?

verbose

Logical: print a completion message?

Value

Invisibly, the output file path.

See Also

irtc, plain_summary, irtc_excel, plot.irtc

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)

file <- tempfile(fileext = ".html")
irtc_report(mod, file, audience = "decision", lang = "en",
    verbose = FALSE)
file.exists(file)
unlink(file)

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