I’m excited to announce the release of dart_irt-a pure Dart implementation of Item Response Theory (IRT).
This package makes it possible to integrate advanced psychometric models directly into Dart and Flutter applications, with no external dependencies.
🔎 What is IRT?
Item Response Theory (IRT) is widely used in educational testing, psychometrics, and adaptive assessments.
It provides a probabilistic framework to model how people with different abilities respond to test items (questions).
- Key benefits of IRT:
- More precise measurement of abilities
- Adaptive testing (shorter, smarter tests)
- Fair comparisons across populations
- Psychometric validity checks
✨ Features in dart_irt
- Dichotomous models: Rasch (1PL), 2PL, 3PL
- Polytomous models: RSM (Rating Scale Model), PCM (Partial Credit Model)
- Estimation: EM/MML algorithms
- CAT helpers: item selection (Fisher/KL)
- DIF analysis: Mantel–Haenszel for fairness detection
- Person estimators: EAP, MLE, WLE
- Fit indices: Infit, Outfit, person-fit U
- Simulation utilities for generating test data
📦 Installation
Add to your pubspec.yaml:
dependencies:
dart_irt: ^0.0.1
then
dart pub get
🚀 Quick Example
import 'package:dart_irt/dart_irt.dart';
void main() {
final rasch = RaschEM();
final X = IrtSim.raschResponses(
persons: 300,
b: [-1.0, 0.0, 1.0],
seed: 42,
);
final res = rasch.fit(X);
print('Item difficulties: ${res.b}');
print('Person abilities (EAP): ${res.thetaEap.take(5).toList()}');
}
📂 Resources
📦 pub.dev package
💻 GitHub repo
💡 Closing Thoughts
This is just the first release of dart_irt.
I hope it will be useful for researchers, EdTech developers, and Flutter enthusiasts who want to bring psychometrics and adaptive learning into their applications.
Feedback and contributions are welcome! 🚀
Top comments (0)