Difference-in-Differences with Bad Controls
Overview
Implements methods for difference-in-differences with bad controls, i.e., time-varying covariates that are affected by the treatment. Provides imputation, doubly robust, and machine learning estimators that are based on Caetano, Callaway, Payne, and Sant'Anna (2026) doi:10.48550/arXiv.2608.03881.
- Tests now pin
num_threads = 2for thegrf-backed estimators so thatR CMD checkstays within CRAN's two-core limit. No user-facing changes.
From NEWS.md in the release
Install
Health
- OK13 OKNow
- OK5 OK2026-09-13
Documentation
- Help pages
- 8 (4 internal)includes a package overview page
- Examples that run
- 75%3 run in a plain check · 1 never run
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 38%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- not measured
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Issues over time
8 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/hugosantanna/badcontrols on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-03-05Pull request it wrote: opened by a project memberCommits: at least 43 crediting it in the message
- Claude Sonnet 540 commits · Jul to Sep 2026
- Claude Opus 4.63 commits · Mar 2026
Dependencies
Installing badcontrols adds 41 packages (22 with compiled code, 43 MB of source tarballs). Heaviest: BH 14 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
Datasets
People & History
- 1.0.1Latest2026-09-12 · current release
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-09-12
- Total releases
- 1 / 1 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 128 KB / 1 file
- Download size
- 246 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("badcontrols")The package provides a citation file, so citation() returns the authors' own entry.
The repository also keeps a CITATION.cff.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.