Detecting, Decomposing, and Stress-Testing Temporal Change in Repeated Decision Systems
Overview
Tools for detecting, decomposing, and testing temporal change in repeated binary decision systems. Decomposes each change in the decision rate into inflow (uptake) and outflow (reversal) through the marginal-transition identity, separates net change from gross turnover, and splits aggregate change into within-group and composition components with a symmetric midpoint decomposition. A unit-level cluster bootstrap gives intervals for every component and a global test of process stability with family-wise-adjusted contrasts and simultaneous confidence bands. Also provides prevalence and transition drift summaries, entropy trends, group-differential drift, change-point diagnostics, robustness and sensitivity analyses, an integrated audit, and a simulator for stable, marginal, masked, abrupt, group-masked, and composition-change scenarios. Complements the 'decisionpaths' package. Applications include algorithmic audit, AI governance, education, health, and organisational research.
New features
dd_decompose()-- flow decomposition of each change in the decision rate into inflow (uptake) and outflow (reversal) using the marginal-transition identity. Reports turnover, net endpoint change (NEC), cumulative marginal burden (CMB), cumulative transition burden (CTB), and, for unbalanced panels, the gap between paired and cross-sectional change.dd_group_decompose()-- symmetric midpoint decomposition of aggregate change into within-group and composition components, composition driftD_C, and group-specific uptake and reversal. Supports time-varying group membership.dd_cluster_bootstrap()-- unit-level cluster bootstrap that keeps each unit's full history. One set of draws can be shared by all inference functions.
Show all changes in 0.2.0Hide the rest of the changes in 0.2.0
dd_global_test()-- global test that uptake, reversal, and/or prevalence are constant across waves, overall or by group. Max-t and Wald statistics with a centred bootstrap null; familywise-adjusted p-values and simultaneous confidence bands. Contrasts compare each step with the previous one (contrast = "consecutive", default) or with the first one (contrast = "baseline", more power against gradual drift).dd_simulate()-- simulate panels under stable, marginal, masked, abrupt, group-masked, and composition-change scenarios, or custom uptake and reversal sequences.inst/simulation/mc_study.R-- script for the Monte Carlo study comparing the prevalence trend test with the global stability test.dd_decompose,dd_group_decompose, anddd_global_testhaveprint()andplot()methods.
Changes to existing functions
dd_audit()no longer returns"no drift detected","marginal drift","moderate drift", or"strong drift". Those labels came from fixed, uncalibrated cut-offs. The audit now runs one cluster bootstrap, the flow and group decompositions, anddd_global_test(), and returns aconclusionstating the test result at levelalpha.verdictis kept as an alias ofconclusion. New arguments:global_test,components,alpha,thresholds(user-supplied practical cut-offs), andseed.dd_changepoint(): the event-alignment result no longer has a"strong"/"weak"evidencelabel; it returnsalphaand a logicalsignificant. Documentation now notes that the wave-level methods have little power with few waves.
Bug fixes
dd_transition():reversal_driftheld the mean absolute change in uptake P(1|0), not reversal. It now holds the mean absolute change in reversal P(0|1). The uptake value is now returned asuptake_drift. TDI values are unchanged. Code that usedreversal_driftfrom 0.1.0 was reading uptake drift and should switch touptake_driftto keep the old numbers.dd_transition()anddd_indices()documentation now gives the TDI and CDB formulas in terms of uptake, reversal, and the decision rate.plot.dd_transition()now shows uptake and reversal.- Repository URLs updated to github.com/subirhait.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK3 OK2026-04-17
Documentation
- Help pages
- 26
- Examples that run
- 100%15 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 97%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- github.com/causalfragility-lab/decisiondrift · last recorded on 2026-10-16
2 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/subirhait/decisiondrift on 2026-10-22.
Dependencies
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.2.0Latest2026-10-17 · current release · diff ↗ ··
added 5 exports
dd_cluster_bootstrap, dd_decompose, dd_global_test, dd_group_decompose, dd_simulatelisted once in CRAN's queue
Seen in one reading of CRAN's incoming queue, at 2026-10-17 02:21 UTC, so it stayed less than the time between readings. - RR 4.6.0 released · 2026-04-24
- 0.1.02026-04-16
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-04-16
- Total releases
- 2 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 148 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("DecisionDrift")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
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.