difNLR: Generalized Logistic Regression Models for DIF and DDF Detection

Differential item functioning (DIF) and differential distractor functioning (DDF) are impor tant topics in psychometrics, pointing to potential unfairness in items with respect to minorities or different social groups. Various methods have been proposed to detect these issues. The difNLR R package extends DIF methods currently provided in other packages by offering approaches based on generalized logistic regression models that account for possible guessing or inattention, and by pro viding methods to detect DIF and DDF among ordinal and nominal data. In the current paper, we describe implementation of the main functions of the difNLR package, from data generation, through the model fitting and hypothesis testing, to graphical representation of the results. Finally, we provide a real data example to bring the concepts together.

Adéla Hladká , Patrícia Martinková

Supplementary materials

Supplementary materials are available in addition to this article. It can be downloaded at RJ-2020-014.zip

CRAN packages used

difR, DIFlasso, DIFboost, GDINA, mirt, lordif, psychotree, difNLR, ShinyItemAnalysis, ggplot2, stats, VGAM, nnet

CRAN Task Views implied by cited packages

Psychometrics, Econometrics, SocialSciences, Distributions, Environmetrics, ExtremeValue, Graphics, MachineLearning, MissingData, Multivariate, Phylogenetics, Survival, TeachingStatistics


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Hladká & Martinková, "The R Journal: difNLR: Generalized Logistic Regression Models for DIF and DDF Detection", The R Journal, 2020

BibTeX citation

  author = {Hladká, Adéla and Martinková, Patrícia},
  title = {The R Journal: difNLR: Generalized Logistic Regression Models for DIF and DDF Detection},
  journal = {The R Journal},
  year = {2020},
  note = {https://doi.org/10.32614/RJ-2020-014},
  doi = {10.32614/RJ-2020-014},
  volume = {12},
  issue = {1},
  issn = {2073-4859},
  pages = {300-323}