Classical Test Theory Item Analysis for Multiple-Choice Tests

A unified toolkit for classical test theory (CTT) item analysis of multiple-choice test data, including item difficulty (p-value), item discrimination (point-biserial correlation and upper-lower 27-percent discrimination index), per-distractor analysis (frequency, proportion, and discrimination), and Haladyna's distractor efficiency. A wrapper function returns a tidy 'mcq_analysis' object with print, plot (difficulty-discrimination scatter), and APA-style table methods for direct inclusion in journal manuscripts. Implemented in pure R with no compiled code and minimal dependencies.


mcqAnalysis

CRAN status R-CMD-check License: MIT

A unified R toolkit for classical test theory (CTT) item analysis of multiple-choice tests. Compute item difficulty, item discrimination (point-biserial and upper-lower 27 percent), per-distractor analysis, and Haladyna's distractor efficiency in a single call. A wrapper function returns a tidy mcq_analysis object with print, plot (difficulty-discrimination scatter), and APA-style table methods for direct manuscript inclusion.

Installation

Install the released version from CRAN:

install.packages("mcqAnalysis")

Or the development version from GitHub:

# install.packages("devtools")
devtools::install_github("Rafhq1403/mcqAnalysis")

Quick example

library(mcqAnalysis)
data(mcq_example)

# Complete item analysis in one call
result <- mcq_analysis(mcq_example$responses, mcq_example$key)
result
#> Multiple-Choice Item Analysis
#> ------------------------------
#> Students: 200
#> Items:    30
#> Mean total score: 15.765 (SD = 6.342)
#>
#> Item-level statistics:
#>   item key difficulty point_biserial discrimination_index distractor_efficiency
#> item01   D      0.850          0.472                0.426                     2
#> ...

# Item quality map
plot(result)

# Publication-ready APA table
apa_table(result, format = "markdown")

What's included

Function Purpose
item_difficulty() p-value per item
item_discrimination() Point-biserial or upper-lower discrimination index
point_biserial() Corrected item-total point-biserial correlation
distractor_analysis() Per-option frequency, proportion, point-biserial
distractor_efficiency() Haladyna's count of functioning distractors
mcq_analysis() One-call wrapper returning an S3 object
plot.mcq_analysis() Difficulty-discrimination scatter
apa_table.mcq_analysis() APA-style table (data.frame, markdown, HTML, LaTeX)
mcq_example (dataset) 200 students × 30 four-option items

Methods reference

The package implements widely-used classical test theory indices. Conventional cutoffs follow Ebel & Frisbie (1991) for discrimination and Haladyna & Downing (1993) for distractor efficiency. See the getting-started vignette for a complete worked example and references.

Related packages

mcqAnalysis is designed to be a CTT-focused companion to its sister package contentValidity, which computes content-validity indices (I-CVI, S-CVI, modified kappa, Aiken's V, Lawshe's CVR). Together they cover pre-administration content validation (via expert review) and post-administration empirical item analysis (via examinee response data) in a consistent API. For inter-rater agreement statistics beyond content validity, see irrCAC; for broader psychometric utilities, see psych.

Citation

citation("mcqAnalysis")

License

MIT © Rashed Alqahtani

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("mcqAnalysis")

0.1.0 by Rashed Alqahtani, 5 months ago


https://github.com/Rafhq1403/mcqAnalysis


Report a bug at https://github.com/Rafhq1403/mcqAnalysis/issues


Browse source code at https://github.com/cran/mcqAnalysis


Authors: Rashed Alqahtani [aut, cre] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports stats, graphics, grDevices

Suggests knitr, rmarkdown, testthat


See at CRAN