Learn R Programming

difR (version 6.1.0)

Collection of Methods to Detect Dichotomous, Polytomous, and Continuous Differential Item Functioning (DIF)

Description

Methods to detect differential item functioning (DIF) in dichotomous, polytomous, and continuous items, using both classical and modern approaches. These include Mantel-Haenszel procedures, logistic regression (including ordinal models), and regularization-based methods such as LASSO. Uniform and non-uniform DIF effects can be detected, and some methods support multiple focal groups. The package also provides tools for anchor purification, rest score matching, effect size estimation, and DIF simulation. See Magis, Beland, Tuerlinckx, and De Boeck (2010, Behavior Research Methods, 42, 847–862, ) for a general overview.

Copy Link

Version

Install

install.packages('difR')

Monthly Downloads

2,075

Version

6.1.0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Sebastien Beland

Last Published

November 29th, 2025

Functions in difR (6.1.0)

RajuZ

Raju's area DIF statistic
LogistikPoly

Detection of DIF in polytomous (ordinal) items using cumulative logistic regression
LordChi2

Lord's chi-square DIF statistic
Continuous

Detection of DIF for continuous item scores using linear regression
ILHTEdif

Detect DIF via the IL-HTE mixed model
LassoData

Rearrange the data matrix for the Detection of DIF using the Lasso Approach (Magis et al. (2015)
SimDichoDif

Generation of DIF for dichotomous items
SCS

Sexual Compulsivity Scale Data Set
LRT

Likelihood-Ratio Test DIF statistic
Logistik

Logistic regression DIF statistic
breslowDay

Breslow-Day DIF statistic
difGenLogistic

Generalized logistic regression DIF method
difGMH

Generalized Mantel-Haenszel DIF method
contrastMatrix

Contrast matrix for computing generalized Lord's chi-squared DIF statistic
difContinuous

Detection of DIF for continuous items via linear regression
dichoDif

Comparison of DIF detection methods
SimPolyDif

Generation of DIF for polytomous items
difBD

Breslow-Day DIF method
difGenLord

Generalized Lord's chi-squared DIF method
difLRT

Likelihood-Ratio Test DIF method
difMH

Mantel-Haenszel DIF method
difQuade

Detection of Differential Item Functioning Using Quade-Type Association Indices for Polytomous (Ordinal) Item
difLord

Lord's chi-squared DIF method
difLogistic

Logistic regression DIF method
difPolyLogistic

Logistic regression DIF statistics for polytomous (ordinal) items
difLogReg

General logistic regression DIF method
difRaju

Raju's area DIF method
difSIBTEST

SIBTEST and Crossing-SIBTEST DIF method
difMantel.poly

Mantel Differential Item Functioning Detection for Polytomous Items
difR-package

Collection of methods to detect dichotomous, polytomous, and continuous differential item functioning (DIF) in psychometrics
itemPar1PL

Item parameter estimation for DIF detection using Rasch (1PL) model
itemPar3PLconst

Item parameter estimation for DIF detection using constrained 3PL model
difStd

Standardization DIF method
genDichoDif

Comparison of DIF detection methods among multiple groups
itemPar3PL

Item parameter estimation for DIF detection using 3PL model
itemPar2PL

Item parameter estimation for DIF detection using 2PL model
genLogistik

Generalized logistic regression DIF statistic
difTID

Transformed Item Difficulties (TID) DIF method
genMantelHaenszel

Generalized Mantel-Haenszel DIF statistic
genLordChi2

Generalized Lord's chi-squared DIF statistic
itemParEst

Item parameter estimation for DIF detection
selectGenDif

Selection of one of the DIF detection methods among multiple groups
plot_lasso_paths

Plot coefficient paths from LASSO DIF
selectDif

Selection of one of the DIF detection methods
lassoDIF.ABWIC

Detection of Differential Item Functioning Using the Lasso Approach: Selection of Optimal \(\lambda\) Value
lassoDIF.CV

Detection of Differential Item Functioning Using the Lasso Approach: Selection of Optimal \(\lambda\) via Cross-Validation
liu_agresti_ccor

Liu--Agresti Common Cumulative Odds Ratio
mantelHaenszel

Mantel-Haenszel DIF statistic
sibTest

SIBTEST DIF statistic
subtestLogistic

Testing for DIF among subgroups with generalized logistic regression
itemRescale

Rescaling item parameters by equal means anchoring
stdPDIF

Standardization DIF statistic
verbal

Verbal Aggression Data Set