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

Special Mac OS X Installation Instructions

In some reported cases XCode does not install the appropriate gfortran compilers in the correct location, therefore they have to be installed manually instead. This is accomplished by inputing the following instructions into the terminal:

curl -O http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2
sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C /

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

7,464

Version

1.43

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Phil Chalmers

Last Published

November 14th, 2024

Functions in mirt (1.43)

MultipleGroupClass-class

Class "MultipleGroupClass"
RMSD_DIF

RMSD effect size statistic to quantify category-level DIF
MDISC

Compute multidimensional discrimination index
SLF

Social Life Feelings Data
MixtureClass-class

Class "MixtureClass"
MixedClass-class

Class "MixedClass"
SAT12

Description of SAT12 data
SIBTEST

(Generalized) Simultaneous Item Bias Test (SIBTEST)
anova-method

Compare nested models with likelihood-based statistics
RCI

Model-based Reliable Change Index
PLCI.mirt

Compute profiled-likelihood (or posterior) confidence intervals
coef-method

Extract raw coefs from model object
boot.LR

Parametric bootstrap likelihood-ratio test
bfactor

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

Create a user defined group-level object with correct generic functions
Science

Description of Science data
averageMI

Collapse values from multiple imputation draws
SingleGroupClass-class

Class "SingleGroupClass"
boot.mirt

Calculate bootstrapped standard errors for estimated models
areainfo

Function to calculate the area under a selection of information curves
draw_parameters

Draw plausible parameter instantiations from a given model
createItem

Create a user defined item with correct generic functions
empirical_ES

Empirical effect sizes based on latent trait estimates
expected.item

Function to calculate expected value of item
expected.test

Function to calculate expected test score
empirical_rxx

Function to calculate the empirical (marginal) reliability
empirical_plot

Function to generate empirical unidimensional item and test plots
deAyala

Description of deAyala data
expand.table

Expand summary table of patterns and frequencies
estfun.AllModelClass

Extract Empirical Estimating Functions
itemGAM

Parametric smoothed regression lines for item response probability functions
gen.difficulty

Generalized item difficulty summaries
itemfit

Item fit statistics
imputeMissing

Imputing plausible data for missing values
fixedCalib

Fixed-item calibration method
extract.mirt

Extract various elements from estimated model objects
extract.group

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

Extract an item object from mirt objects
fixef

Compute latent regression fixed effect expected values
fscores

Compute factor score estimates (a.k.a, ability estimates, latent trait estimates, etc)
mirt-package

Full information maximum likelihood estimation of IRT models.
iteminfo

Function to calculate item information
mdirt

Multidimensional discrete item response theory
logLik-method

Extract log-likelihood
key2binary

Score a test by converting response patterns to binary data
marginal_rxx

Function to calculate the marginal reliability
itemplot

Displays item surface and information plots
itemstats

Generic item summary statistics
likert2int

Convert ordered Likert-scale responses (character or factors) to integers
lagrange

Lagrange test for freeing parameters
mirtCluster

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

Compute numerical derivatives
mirt.model

Specify model information
personfit

Person fit statistics
mirt

Full-Information Item Factor Analysis (Multidimensional Item Response Theory)
residuals-method

Compute model residuals
probtrace

Function to calculate probability trace lines
print.mirt_df

Print generic for customized data.frame console output
print-method

Print the model objects
plot,MultipleGroupClass,missing-method

Plot various test-implied functions from models
reverse.score

Reverse score one or more items from a response matrix
poly2dich

Change polytomous items to dichotomous item format
multipleGroup

Multiple Group Estimation
print.mirt_list

Print generic for customized list console output
print.mirt_matrix

Print generic for customized matrix console output
mod2values

Convert an estimated mirt model to a data.frame
traditional2mirt

Convert traditional IRT metric into slope-intercept form used in mirt
read.mirt

Translate mirt parameters into suitable structure for plink package
remap.distance

Remap item categories to have integer distances of 1
secondOrderTest

Second-order test of convergence
mixedmirt

Mixed effects modeling for MIRT models
randef

Compute posterior estimates of random effect
testinfo

Function to calculate test information
simdata

Simulate response patterns
thetaComb

Create all possible combinations of vector input
summary-method

Summary of model object
show-method

Show model object
wald

Wald statistics for mirt models
vcov-method

Extract parameter variance covariance matrix
DIF

Differential item functioning statistics
DiscreteClass-class

Class "DiscreteClass"
LSAT6

Description of LSAT6 data
MDIFF

Compute multidimensional difficulty index
LSAT7

Description of LSAT7 data
M2

Compute the M2 model fit statistic
DTF

Differential test functioning statistics
Bock1997

Description of Bock 1997 data
ASVAB

Description of ASVAB data
DRF

Differential Response Functioning statistics