Movatterモバイル変換


[0]ホーム

URL:


IRT-M R package

The IRT-M R package is a package that allows users to estimatemultiple, potentially correlated, latent dimensions with substantivemeaning(s) and place data units on the dimensions. It does so by havingusers specify a constraints matrix for the test items (e.g., agreementfeatures, survey and test questions, votes, etc.) before estimating anIRT model on the data. The current version of the package works withbinary data. Other data inputs, such as categorical survey questions orcontinuous measurements, must be reformatted into a binary formatthrough one-hot encoding or another decision rule.

IRT-M solves a long-running problem with Item Response Theory models:classic IRT models produce latent dimensions by generating a model thatbest predicts the underlying data and then places the data units on thediscovered dimension. These dimensions do not intrinsically capturetheoretical concepts and may or may not be the dimension of interest.Users of IRT models have to make post hoc interpretations of theresulting dimensions based on prior knowledge of the underlyingunits.

IRT-M prompts users to specify a constraints matrix, which structuresthe dimensions that the model returns. Creating the constraints matrixentails hand-codes each choice in the data according to its connectionto the latent dimensions of interest (e.g., perception of threat fromimmigration; ideological position; degree to which peace treaty capturesminority rights and security). This imposes upfront costs; however, itis the step that produces measurements of positions on conceptuallymeaningful latent dimensions while eliminating the need for exogenousinformation to identify the model. If the theory (1) captures someaspect of the process that generated the data and (2) the constraintmatrix coding is applied consistently, the model will produce measuresof relevant theoretical concepts that are constant in meaning acrossdisparate data sources and across time and place. The constraint matrixcan be omitted for a conventional IRT estimation of the data.

You can find additional motivating examples, developed applications,and a technical presentation of the IRT-M model in thepaper.

Getting Started

You can install the IRTM package usingdevtools orpak by using the following code:

Viadevtools:

install.packages("devtools")library(devtools)devtools::install_github("dasiegel/IRT-M", force=TRUE)library(IRTM)

Viapak:

install.packages("pak")library(pak)pak::pkg_install("dasiegel/IRT-M")library(IRTM)

Use and Examples

The IRT-M model takes a set of data composed of an array of choices(e.g., answers to survey questions; votes on bills; elements oftreaties, indicators from research organizations) made by data units(e.g., survey respondents; legislators; peace treaties).

Below we present some examples of IRT-M use cases. A full walkthroughcan be found in thevignette.

  1. Estimate a latent “Satisfaction with the status quo” dimension from32 countries surveyed by Afrobarometer across three collection waves.Using the IRT-M estimate and survey metadata, we can discover insightsthat we can use for future research and/or validate with subject matterexpertise.

Without IRT-M, this is a tricky measure to produce for severalreasons, including: - Respondent interpretations of survey questionsvary contextually by location and time - The survey instrument changesacross waves

We address the incompatibility by coding a separate constraints (M)matrix for each country and survey year. As long as our codingaccurately captures the contextual variation in how respondentsinterpret and respond to questions, our measure will be consistent.Interested parties can review the matrix coding and either confirm ourinterpretation or estimate an alternative version that reflects theirown understanding.

  1. Cross-national comparison, disaggregated by location (urban, rural,and other).
allThetasVisualized_UrbanRuralDivideallThetasVisualized_UrbanRuralDivide

We can use this visualization to uncover interesting patterns. Forexample, the distribution of estimated satisfaction differssignificantly for Algeria’s urban and rural populations during the2011-2013 survey wave, with the rural leaning more positive. By the2014-2015 wave, urban and rural Algerians had similar responsepatterns.

We can use the same IRT-M + respondent metadata to estimatewithin-country distributions according to salient local groupings.

  1. Estimate “satisfaction with the status quo” within countryrounds:

Here we can see estimates for latent satisfaction with the status quofor Niger in round 6 of the Afrobarometer, disaggregated by the ethnicgroup identification of the respondent. Notably, the distribution ofsatisfaction is more favorable for respondents reporting that theybelong to the Arabe group than those who identified with theZarma/Songhai group– a finding that we can validate (or falsify).

Niger Round 6
  1. Cross-national trends, disaggregated by a theoretically-importantattribute.

Here we take data from the 2021 Eurobarometer 94.3 survey round andestimate six latent dimensions: a sense of cultural threat (Theta 1), asense of religious threat (Theta 2), a sense of economic threat (Theta3), a sense of health threat (Theta 4), support for immigration (Theta5), and support for the European Union (Theta 6).

We can then take IRT-M’s estimate of this latent dimension andvisualize the distribution of the latent dimensions learned by IRT-Maccording to attributes in the Eurobarometer’s metadata. In this case,we focus on relationships to media:

Threat by media

We can find that differing media consumption and trust patterns areassociated with different perceptions of threats, as well as differinglevels of support for immigration and support for the EuropeanUnion.

TroubleshootingInstallation Problems

One common installation problem on Mac OS machines arises when R isunable to link to the GCC compiler. When that happens, the packageinstaller will throw an error that includes the following:

ld: library 'gfortran' not foundclang: error: linker command failed with exit code 1 (use -v to see invocation)make: *** [IRTM.so] Error 1ERROR: compilation failed for package ‘IRTM’

We have had success with the following steps:

brew reinstall gccbrew reinstall gfortran

[8]ページ先頭

©2009-2025 Movatter.jp