Learn R Programming

⚠️There's a newer version (1.44.0) of this package.Take me there.

mirt

Multidimensional item response theory in R.

Description

Analysis of dichotomous and polytomous response data using unidimensional and multidimensional latent trait models under the Item Response Theory paradigm. Exploratory and confirmatory models can be estimated with quadrature (EM) or stochastic (MHRM) methods. Confirmatory bi-factor and two-tier analyses are available for modeling item testlets. Multiple group analysis and mixed effects designs also are available for detecting differential item functioning and modeling item and person covariates.

Examples and evaluated help files are available on the wiki

Various examples and worked help files have been compiled using the knitr package to generate HTML output, and are available on the package wiki. User contributions are welcome!

Installing from source

It's recommended to use the development version of this package since it is more likely to be up to date than the version on CRAN. To install this package from source:

  1. Obtain recent gcc, g++, and gfortran compilers. Windows users can install the Rtools suite while Mac users will have to download the necessary tools from the Xcode suite and its related command line tools (found within Xcode's Preference Pane under Downloads/Components); most Linux distributions should already have up to date compilers (or if not they can be updated easily). Windows users should include the checkbox option of installing Rtools to their path for easier command line usage.

  2. Install the devtools package (if necessary). In R, paste the following into the console:

install.packages('devtools')
  1. Load the devtools package (requires version 1.4+) and install from the Github source code.
library('devtools')
install_github('philchalmers/mirt')

Installing from source via git

If the devtools approach does not work on your system, then you can download and install the repository directly.

  1. Obtain recent gcc, g++, and gfortran compilers (see above instructions).

  2. Install the git command line tools.

  3. Open a terminal/command-line tool. The following code will download the repository

code to your computer, and install the package directly using R tools (Windows users may also have to add R and git to their path)

git clone https://github.com/philchalmers/mirt
R CMD INSTALL mirt

Licence

This package is free and open source software, licensed under GPL (>= 3).

Bugs and Questions

Bug reports are always welcome and the preferred way to address these bugs is through the Github 'issues'. Feel free to submit issues or feature requests on the site, and I'll address them ASAP. Also, if you have any questions about the package, or IRT in general, then feel free to create a 'New Topic' in the mirt-package Google group. Cheers!

Copy Link

Version

Install

install.packages('mirt')

Monthly Downloads

9,054

Version

1.14

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Phil Chalmers

Last Published

January 28th, 2025

Functions in mirt (1.14)

boot.mirt

Calculate bootstrapped standard errors for estimated models
LSAT7

Description of LSAT7 data
MultipleGroupClass-class

Class "MultipleGroupClass"
M2

Compute the M2 model fit statistic
fixef

Compute latent regression fixed effect expected values
itemGAM

Parametric smoothed regression lines for item response probability functions
fscores

Compute factor score estimates (a.k.a, ability estimates, latent trait estimates, etc)
deAyala

Description of deAyala data
mirt-package

Full information maximum likelihood estimation of IRT models.
key2binary

Score a test by converting response patterns to binary data
personfit

Person fit statistics
empirical_rxx

Function to calculate the empirical (marginal) reliability
anova-method

Compare nested models with likelihood-based statistics
mirtCluster

Define a parallel cluster object to be used in internal functions
MDISC

Compute multidimensional discrimination index
SAT12

Description of SAT12 data
multipleGroup

Multiple Group Estimation
iteminfo

Function to calculate item information
MDIFF

Compute multidimensional difficulty index
Science

Description of Science data
createItem

Create a user defined item with correct generic functions
expected.test

Function to calculate expected test score
DiscreteClass-class

Class "DiscreteClass"
DIF

Differential item functioning statistics
bfactor

Full-Information Item Bi-factor and Two-Tier Analysis
LSAT6

Description of LSAT6 data
probtrace

Function to calculate probability trace lines
expand.table

Expand summary table of patterns and frequencies
marginal_rxx

Function to calculate the marginal reliability
wald

Wald statistics for mirt models
mdirt

Multidimensional discrete item response theory
SingleGroupClass-class

Class "SingleGroupClass"
mirt.model

Specify model loadings
simdata

Simulate response patterns
averageMI

Collapse values from multiple imputation draws
Bock1997

Description of Bock 1997 data
testinfo

Function to calculate test information
plot-method

Plot various test-implied functions from models
itemfit

Item fit statistics
randef

Compute posterior estimates of random effect
mirt

Full-Information Item Factor Analysis (Multidimensional Item Response Theory)
DTF

Differential test functioning statistics
imputeMissing

Imputing plausible data for missing values
show-method

Show model object
itemplot

Displays item surface and information plots
expected.item

Function to calculate expected value of item
mixedmirt

Mixed effects modeling for MIRT models
MixedClass-class

Class "MixedClass"
mod2values

Convert an estimated mirt model to a data.frame
extract.group

Extract a group from a multiple group mirt object
extract.mirt

Extract various elements from estimated model objects
print-method

Print the model objects
PLCI.mirt

Compute profiled-likelihood (or posterior) confidence intervals
extract.item

Extract an item object from mirt objects
coef-method

Extract raw coefs from model object
residuals-method

Compute model residuals
summary-method

Summary of model object