Overview
modelsirt is an R package that provides an interactive Shiny-based application for visualizing Item Response Theory (IRT) model curves. This package is designed for researchers, educators, and practitioners working with psychometric models, offering an intuitive way to explore and understand how different IRT models behave under various parameter configurations.
The package allows users to interactively manipulate model parameters and instantly see how these changes affect item characteristic curves (ICCs), category response curves (CRCs), and item information functions. This makes it an excellent educational tool for teaching IRT concepts and a practical tool for model exploration and parameter sensitivity analysis.
Features
modelsirt provides interactive visualizations for multiple IRT models, including:
- Rasch Model: The fundamental dichotomous IRT model with equal discrimination parameters
-
1PL, 2PL, 3PL, and 4PL Models: Progressively more complex logistic models for binary items
- 1PL: One-parameter logistic model (difficulty only)
- 2PL: Two-parameter logistic model (difficulty and discrimination)
- 3PL: Three-parameter logistic model (adds lower asymptote/guessing parameter)
- 4PL: Four-parameter logistic model (adds upper asymptote/carelessness parameter)
- Graded Response Model (GRM): For ordinal polytomous items with ordered categories
- Partial Credit Model (PCM): For ordinal items where categories represent partial credit
- Rating Scale Model (RSM): A constrained version of PCM with common threshold spacings across items
- Generalized Partial Credit Model (GPCM): Extends PCM to include item discrimination parameters
- Nominal Response Model (NRM): For unordered categorical responses
- Thurstonian IRT Model: For forced-choice items and comparative judgments
Key Capabilities
- Interactive Parameter Adjustment: Use sliders to modify item parameters in real-time
- Multiple Visualization Types: View item characteristic curves, category response curves, and information functions
- Modern Plotting: Built with Plotly for interactive, publication-quality graphics
- Educational Tool: Perfect for teaching IRT concepts and exploring model behavior
- Research Application: Useful for parameter sensitivity analysis and model comparison
Background and Attribution
This package is a fork and significant enhancement of the original irtDemo package by Wes Bonifay and Metin Bulus, which is available on CRAN. The current version has been substantially modified and expanded by Dimitrios Zacharatos to:
- Consolidate multiple IRT models into a single unified interface
- Modernize visualizations using Plotly for enhanced interactivity
- Add support for additional IRT models
- Improve the user interface and experience
Special thanks to Kostas Maistrelis for contributing the implementation of Thurstonian IRT curves.
Original Authors: Wes Bonifay and Metin Bulus
Current Maintainer: Dimitrios Zacharatos
Original CRAN Package: irtDemo
Installation
Prerequisites
Install R (version 4.0 or higher recommended)
Download from: https://cran.r-project.org/Install RStudio (optional but highly recommended)
Download from: https://posit.co/downloads/
Package Installation
Open RStudio (or R console) and run the following commands:
# Install devtools if not already installed
if (!require("devtools")) {
install.packages("devtools")
}
# Install modelsirt from GitHub
devtools::install_github("sedzinfo/modelsirt")The package will automatically install its dependencies: - shiny: For the interactive web application - plotly: For interactive plotting - magrittr: For pipe operators
Usage
Using modelsirt is straightforward:
This will open an interactive web application in your default browser where you can:
- Select the IRT model you want to explore from the navigation menu
- Adjust item parameters using the interactive sliders
- Observe how the item characteristic curves change in real-time
- Explore different scenarios and parameter combinations
- Use the visualizations for teaching or presentations
Example Workflow
library(modelsirt)
# Launch the app
modelsirt()
# In the app:
# 1. Navigate to the "2PL Model" tab
# 2. Adjust the discrimination parameter (α) to see how it affects curve steepness
# 3. Adjust the difficulty parameter (β) to see how it shifts the curve
# 4. Switch to "3PL Model" to explore the guessing parameter
# 5. Compare different models by switching between tabsUse Cases
modelsirt is valuable for:
- Education: Teaching IRT theory in psychometrics courses
- Research: Exploring model behavior and parameter sensitivity
- Test Development: Understanding item characteristics during test construction
- Model Selection: Comparing different IRT models for your data
- Presentations: Creating interactive demonstrations of IRT concepts
- Learning: Self-study and exploration of psychometric models
Contributing
Contributions are welcome! If you’d like to contribute to modelsirt, please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin feature/YourFeature) - Open a Pull Request
Issues and Support
If you encounter any issues or have questions:
- Open an issue on GitHub Issues
- Provide a reproducible example when reporting bugs
- Check existing issues before creating a new one
License
This package is licensed under the GNU General Public License (GPL) version 2 or later. See the LICENSE file for details.
Citation
If you use modelsirt in your research or teaching, please cite both the original work and this package:
Zacharatos, D. (2026). modelsirt: Interactive IRT Model Visualization.
R package version 0.0.0.9000. https://github.com/sedzinfo/modelsirt
Original work by:
Bonifay, W., & Bulus, M. (2021). irtDemo: Item Response Theory Demo Collection.
R package. https://CRAN.R-project.org/package=irtDemo
Acknowledgments
- Wes Bonifay and Metin Bulus for creating the original irtDemo package
- Kostas Maistrelis (@maisk) for implementing Thurstonian IRT curves
- The R community for the excellent packages that make this work possible
References
For those interested in learning more about IRT:
- Embretson, S. E., & Reise, S. P. (2000). Item Response Theory for Psychologists. Lawrence Erlbaum Associates.
- Baker, F. B., & Kim, S.-H. (2017). The Basics of Item Response Theory Using R. Springer.
- de Ayala, R. J. (2009). The Theory and Practice of Item Response Theory. Guilford Press.






