Skip to content

aiDIF

0.3.0Package record

Differential Item Functioning for AI-Scored Assessments

0packages dependsuggested by 1
2.5Kdownloads / year
80.6%test coverage
13/13flavors OK

Overview

About

Detects and quantifies differential item functioning (DIF) in AI-scored educational and psychological assessments. Provides a fully self-contained robust DIF engine (M-estimation via iteratively re-weighted least squares with the bi-square loss), cross-checked against the reference implementation in 'robustDIF', alongside the Differential AI Scoring Bias (DASB) test, which detects item-level scoring shifts that differ across subgroups when comparing human and AI scoring conditions. Supports independent and paired scoring designs, including a bootstrap estimator of the cross-condition covariance that paired designs require, a one-call workflow from raw item scores through 'mirt' calibration, robust linking of the cross-condition contrast, bootstrap standard errors, multiplicity control, simulation of paired human and AI item scores, anchor weight diagnostics, and an AI-effect classification framework. Methods follow Halpin (2024) doi:10.1007/s11336-024-09957-6.

Changes in 0.3.0

New features

  • fit_aidif_responses() runs the whole analysis from raw item scores: it calibrates both scoring conditions in 'mirt' (item parameters free in both groups), converts the fits with as_aidif(), estimates the cross-condition covariance for paired designs, and calls fit_aidif(). Dichotomous (2PL) and polytomous (graded) items are supported.
  • paired_cross_cov() estimates the cross-condition covariance that design = "paired" requires, by resampling examinees within group and refitting both calibrations on each resample. In 0.2.0 the paired design accepted this matrix but offered no way to obtain it, so it was usable only by analysts who could derive it themselves. The default estimator rescales the bootstrap correlation by the model-based standard errors, which guarantees a non-negative paired variance. Bootstrap replicates can run in parallel on all platforms via cores.
Show all changes in 0.3.0Hide the rest of the changes in 0.3.0
  • fit_aidif_responses() defaults to metric = "linked". When the AI engine changes item slopes and the groups differ in mean trait, raw DASB is shifted on every item; in simulation (AI slopes 0.8 times human, impact 0.5 SD, no true DASB) the raw test rejected about 16% of the time at a nominal 5%, while the linked metric held 5%. fit_aidif() keeps its 0.2.0 default ("common") for backward compatibility.
  • fit_aidif_responses(se = "bootstrap") reports bootstrap standard errors for DASB. Under metric = "linked" the item-common offset is re-estimated in each replicate, so these standard errors include the variability of the bi-square weights that the analytic linked-metric variance ignores.
  • simulate_aidif_responses() generates paired human and AI item scores from a logistic graded response model with known DIF, DASB, AI drift, AI slope change, and human-AI agreement (Gaussian copula). Unlike simulate_aidif_data(), which draws parameter estimates directly, it produces response data that go through real calibration, so it supports Type I error, power, and coverage studies of the full workflow.
  • compare_robustdif() runs aiDIF's robust scaling engine and 'robustDIF' on the same estimates for each scaling convention and reports the difference. The two agree to machine precision.

Bug fixes

  • print() for DASB tables dropped the item labels and printed row numbers instead. Fixed.

Other changes

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 4.0 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK8 OK2026-04-22
Advisories

none known

Documentation

In release 0.3.0
READMEYes · 465 wordsVignettesYes · 1 · evaluation depends on the environmentNEWSYes · 100% structured · mentions 0.3.0Citation fileYes · computed when R runs itWebsitenot declared in DESCRIPTION
Help pages
30 (13 internal)
Examples that run
85%11 run in a plain check (2 of them under a condition) · 2 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
92%
Documented parameters
93%
Return-value docs
100%
Help pages citing references
7%

Downloads

2.5K
CRAN downloads in the past year
Rank #8,753 · ~7/day · ~206/mo
Daily download trend is not available in this view yet.
39430 days
1.1K90 days
2.5K1 year
Compare downloads with other packages →
Also on59 r2u26 autocran

Repository

0Stars
0Forks
0Open issues
0Open PRs
0Releases
Last activity 2026-10-21
Responsiveness
not measured
Earlier repositories
PracticesBeta

Repository github.com/subirhait/aidif is linked, but repository-practices checks have not run for it yet.

How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
5 external dependencies (excludes base and recommended)

Installing aiDIF adds no packages beyond those that come with R.

Depends (1)
R >= 3.5.0
Imports (5)
Matrixstatsgraphicsutilsparallel
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

People & History

People (1)
Author, Maintainer since 0.1.0 (2026)
Releases (3)

Pick two releases to compare their code metrics.

  • 0.3.0Latest
    record
    2026-10-22 · current release · diff ↗ ·
    added 4 exports
    compare_robustdif, fit_aidif_responses, paired_cross_cov, simulate_aidif_responses
    ·
    26 hours in CRAN's queue
    Listed in CRAN's incoming queue from 2026-10-21 19:49 to 2026-10-22 21:24 UTC, in 7 readings.
  • 0.2.0
    record
    2026-09-05 · diff ↗ ·
    added 1 export
    as_aidif
  • R
    R 4.6.0 released · 2026-04-24
  • 0.1.0
    record
    2026-04-21
  • R
    R 4.5.0 released · 2025-04-11
Across CRAN, the median accepted release of the past year spent 26 hours in the queue, 90% under 11 days.How queue time is measured

Package metadata

First published
2026-04-21
Total releases
3 / 1 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 3.5.0
Download size
102 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("aiDIF")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for aiDIF version 0.3.0 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy