Skip to main content
v2026.11,858 entries · CC-BY 4.0

MIRT: Multidimensional Item Response Theory and the mirt R Package

MIRT explained: the compensatory model equation, a hand-worked example, model and estimation choices, APA reporting, and mirt code for R and Excel.

Written and maintained by CASRAI Editorial Board

Last updated

MIRT (multidimensional item response theory) models how a person’s standing on two or more latent traits shapes the probability of answering each test or questionnaire item in a given way. It extends item response theory beyond a single ability scale. The name “mirt” is also the R package, by Phil Chalmers, that fits these models; this page covers both, for researchers who need to understand the model equation, check a result by hand, and report the analysis.

What is MIRT (multidimensional item response theory)?

In unidimensional IRT, one latent trait (θ) explains responses to every item. In MIRT, θ is a vector with two or more elements, and each item has a slope for each dimension. An arithmetic test might draw on both number sense and reading comprehension; MIRT lets items load differently on each. The CRAN description of the mirt package says it analyses “discrete response data using unidimensional and multidimensional item analysis models”, including exploratory and confirmatory item factor analysis, bi-factor and two-tier testlet models, differential functioning, latent class and unfolding models (CRAN, version 1.48, published 2026-10-06).

The MIRT model equation, symbol by symbol

The mirt() reference gives the multidimensional logistic model for a dichotomous item with two dimensions:

P(x = 1 | θ, ψ) = g + (u − g) / (1 + exp(−(a₁θ₁ + a₂θ₂ + d)))

  • P(x = 1 | θ, ψ): probability of a keyed (correct or endorsed) response given the person’s traits θ and the item parameters ψ.
  • θ₁, θ₂: the person’s positions on the two latent dimensions.
  • a₁, a₂: the item’s slopes (discriminations), one per dimension. A larger a means the item separates people on that dimension more sharply.
  • d: the item intercept. It sets the logit when every θ is 0, and replaces the “difficulty” b of unidimensional models.
  • g: lower asymptote (guessing). u: upper asymptote. The two-parameter logistic (2PL) model fixes g = 0 and u = 1, leaving P = 1 / (1 + exp(−(a₁θ₁ + a₂θ₂ + d))).

Because the slope terms are added together, this is a compensatory model, explained below.

Worked example with the arithmetic shown

Take a 2PL item with a₁ = 1.2, a₂ = 0.8 and d = −0.5. The logit is z = 1.2θ₁ + 0.8θ₂ − 0.5, and P = 1 / (1 + e−z).

Person θ₁, θ₂ Logit z P(x = 1)
A 1, 0 1.2(1) + 0.8(0) − 0.5 = 0.7 1 / (1 + e−0.7) = 0.668
B −1, 2 1.2(−1) + 0.8(2) − 0.5 = −0.1 1 / (1 + e0.1) = 0.475
C 0, 0 −0.5 1 / (1 + e0.5) = 0.378

Person B is one standard deviation below average on dimension 1, yet has a probability of 0.475, well above person C’s 0.378, because a high θ₂ offsets the low θ₁. That offsetting is what “compensatory” means.

Interpreting slopes, intercepts and probabilities

Quantity How to read it
a₁ larger than a₂ The item is driven mainly by dimension 1 (in the example, 1.2 versus 0.8).
a for one dimension near 0 The item barely measures that dimension.
d negative At θ = (0, 0) the probability is below .50 (here 0.378).
d positive At θ = (0, 0) the probability is above .50.
z = 0 P = .50 when g = 0 and u = 1.

Many different (θ₁, θ₂) combinations give the same probability: any pair with the same z. This is why a single item cannot identify a person’s position on both dimensions, and why precision for each dimension depends on the whole item set (see test information functions and measurement precision).

Compensatory versus noncompensatory MIRT models

In a compensatory model, strength on one dimension offsets weakness on another, because the dimension terms are summed inside one logistic function. In a noncompensatory (or partially compensatory) model, the probability is a product of dimension-specific logistic functions, so each skill must clear its own threshold. Published reviews (PMC5965584; arXiv 2507.15222) note that compensatory models are the most commonly used, that terminology is inconsistent across the literature, and that fit statistics alone may not distinguish the two families. The mirt() equation above is the compensatory form.

Choosing a MIRT model and estimation method

Question Option in mirt Source detail
Do I know how items map to dimensions? Confirmatory: model written as a string such as F1 = 1,4,5 and F2 = 2,3, or F = 1-5 mirt() reference
Do I want the data to suggest the structure? Exploratory: a single number above 1 as the model argument mirt() reference
One general factor plus specific factors? Bi-factor and two-tier models are supported CRAN description
Three or more dimensions? The reference recommends QMCEM, MCEM, SEM or MHRM rather than the default EM mirt() reference
Which item type? itemtype NULL defaults to graded or 2PL; options include Rasch, 1PL, 2PL, 3PL, 4PL, graded, gpcm, nominal mirt() reference

To compare nested models, the manual’s anova() method uses likelihood-ratio tests together with AIC, BIC, SABIC and HQ, and the first model supplied must be the most constrained one.

Assumptions and common mistakes

  • Local independence. Items are assumed independent given θ; leftover dependence between items signals missing dimensions or testlet structure.
  • Wrong dimensionality. Fitting one dimension when several exist, or extracting more than the data support, distorts slopes. Compare candidate models rather than relying on one index.
  • Treating dimensions as interchangeable. Exploratory solutions are rotation-dependent; the coef() default rotation in the manual is “none”, so state any rotation you apply.
  • Reading d as difficulty. In multidimensional models the intercept d is not a difficulty on any single scale.
  • Ignoring sample demands. Models with more dimensions and item types are more parameter-heavy, so check that your sample can support the model you request.

For the factor-analytic background see exploratory factor analysis and confirmatory factor analysis; for the single-dimension special case see the Rasch model.

How to report a MIRT analysis (APA style)

Name the software, version, model, item type and estimation method, and cite the package paper. Example wording (replace the bracketed items with your own results):

Item responses were analysed with a two-dimensional compensatory two-parameter logistic model using the mirt package (Chalmers, 2012) version 1.48 in R, with the default EM algorithm. [Fit statistics, model comparisons and slope estimates go here.]

Reference entry: Chalmers, R. P. (2012). mirt: A multidimensional item response theory package for the R environment. Journal of Statistical Software, 48(6), 1–29. https://doi.org/10.18637/jss.v048.i06

How to calculate MIRT quantities in R, Excel or Python

R (mirt package)

install.packages("mirt")
library(mirt)
# 'dat' is a data frame of scored item responses
fit2 <- mirt(dat, model = 2)      # exploratory, 2 dimensions
coef(fit2)                          # slopes (a1, a2) and intercept (d)
# confirmatory: items 1,4,5 on F1 and 2,3 on F2
spec <- mirt.model("F1 = 1,4,5
F2 = 2,3")
fit_c <- mirt(dat, model = spec)
anova(fit_c, fit2)                  # most constrained model first

Excel

With a₁ in B1, a₂ in B2, d in B3, θ₁ in B4 and θ₂ in B5, the 2PL probability is:

=1/(1+EXP(-(B1*B4+B2*B5+B3)))

With the example values it returns 0.668 for θ = (1, 0).

Python

This page does not rely on a Python counterpart to the mirt package; the model equation itself is a few lines:

import math
def p_2pl(a, d, theta):
    z = sum(ai * ti for ai, ti in zip(a, theta)) + d
    return 1 / (1 + math.exp(-z))

print(round(p_2pl([1.2, 0.8], -0.5, [1, 0]), 3))   # 0.668
print(round(p_2pl([1.2, 0.8], -0.5, [-1, 2]), 3))  # 0.475

FAQ

What does mirt stand for?

MIRT stands for multidimensional item response theory. The R package mirt takes its name from it and, per its JSS abstract, estimates “multidimensional item response theory parameters for exploratory and confirmatory models by using maximum-likelihood methods.”

Who maintains the mirt R package and what licence is it under?

Phil Chalmers is the author and maintainer; CRAN lists the licence as GPL (≥ 3).

Is MIRT the same as factor analysis?

The two are closely related: the package describes its exploratory and confirmatory models as item factor analysis. MIRT is built for categorical item responses and models response probabilities rather than continuous indicators.

When should I use MIRT instead of unidimensional IRT?

Use it when the items are meant to measure, or demonstrably reflect, more than one latent trait, so that forcing a single scale would misrepresent the structure.

Sources

  • CRAN: mirt package page, https://cran.r-project.org/web/packages/mirt/ (version 1.48; read 2026-11-12).
  • Chalmers, R. P. (2012). Journal of Statistical Software, 48(6), https://www.jstatsoft.org/article/view/v048i06 (read 2026-11-12).
  • mirt() function reference, https://philchalmers.github.io/mirt/reference/mirt.html (read 2026-11-12).
  • mirt reference manual, https://philchalmers.r-universe.dev/mirt/doc/manual.html (read 2026-11-12).
  • Compensatory and noncompensatory model reviews: https://pmc.ncbi.nlm.nih.gov/articles/PMC5965584 and https://arxiv.org/abs/2507.15222.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about MIRT: Multidimensional Item Response Theory and the mirt R Package

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →