The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

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.

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

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.