Package: nonabsdid 0.4.1.9000

Takuma Iwasaki

nonabsdid: Visualize Heterogeneity-Robust Event Studies for Non-Absorbing Treatments

Runs several heterogeneity-robust difference-in-differences (DID) event-study estimators for non-absorbing (i.e., treatment can switch on and off over time, allowing treatment reversal) binary treatments through their respective packages, harmonizes their output onto a common time axis and tidy data structure, and overlays them in a single 'ggplot2' panel for visual comparison. Supported estimators include those provided by 'DIDmultiplegtDYN', 'PanelMatch', and 'fect', with an optional naive two-way fixed-effects reference series via 'fixest'. The underlying methods are respectively described in Clement de Chaisemartin and Xavier D'Haultfoeuille. "Difference-in-Differences Estimators of Intertemporal Treatment Effects." The Review of Economics and Statistics (2026) <doi:10.1162/rest_a_01414>, Kosuke Imai, In Song Kim, and Erik H. Wang. "Matching methods for causal inference with time‐series cross‐sectional data." American Journal of Political Science 67.3 (2023) <doi:10.1111/ajps.12685>, Licheng Liu, Ye Wang, and Yiqing Xu. "A practical guide to counterfactual estimators for causal inference with time‐series cross‐sectional data." American Journal of Political Science 68.1 (2024) <doi:10.1111/ajps.12723>, and Laurent R. Bergé, Kyle Butts, and Grant McDermott. "Fast and user-friendly econometrics estimations: The R package 'fixest'." arXiv preprint (2026) <doi:10.48550/arXiv.2601.21749>. A single nabs_event_study() wrapper runs any supported estimator with a common interface; nabs_event_study_simple() provides a one-line front door for quick exploratory runs; the S3 generic as_nabs_event_study() coerces estimator output into a tidy stable schema; and nabs_event_plot() overlays multiple methods on a single 'ggplot2' panel, with optional naive two-way fixed effects drawn in a neutral color as a reference.

Authors:Takuma Iwasaki [aut, cre]

nonabsdid_0.4.1.9000.tar.gz
nonabsdid_0.4.1.9000.zip(r-4.7)nonabsdid_0.4.1.9000.zip(r-4.6)nonabsdid_0.4.1.9000.zip(r-4.5)
nonabsdid_0.4.1.9000.tgz(r-4.6-any)nonabsdid_0.4.1.9000.tgz(r-4.5-any)
nonabsdid_0.4.1.9000.tar.gz(r-4.7-any)nonabsdid_0.4.1.9000.tar.gz(r-4.6-any)
nonabsdid_0.4.1.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
nonabsdid/json (API)

# Install 'nonabsdid' in R:
install.packages('nonabsdid', repos = c('https://takuma1102.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/takuma1102/nonabsdid/issues

Pkgdown/docs site:https://takuma1102.github.io

On CRAN:

Conda:

5.02 score 7 scripts 367 downloads 11 exports 25 dependencies

Last updated from:92af671e0c. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK310
source / vignettesOK317
linux-release-x86_64OK289
macos-release-arm64OK338
macos-oldrel-arm64OK357
windows-develOK224
windows-releaseOK145
windows-oldrelOK191
wasm-releaseOK170

Exports:aggregate_effectsas_nabs_effect_cellsas_nabs_event_studynabs_effect_cellsnabs_event_plotnabs_event_studynabs_event_study_simplenabs_read_dtanabs_write_dtanaive_twfeplot_effect_matrix

Dependencies:clicpp11dplyrfarvergenericsggplot2gluegtableisobandlabelinglifecyclemagrittrpillarpkgconfigR6RColorBrewerrlangS7scalestibbletidyselectutf8vctrsviridisLitewithr

Cohort-by-time effect matrices and heatmaps
Event study vs. effect matrix | A toy non-absorbing panel | One-step fit: nabs_effect_cells() | Comparing methods | Working from existing objects | Collapsing back to an event study | The cell schema | Why not PanelMatch?

Last update: 2026-06-22
Started: 2026-06-22

nonabsdid for Stata users
1. Why use R for this at all? | 2. Getting your data in: nabs_read_dta() | 3. Rosetta stone: did_multiplegt_dyn → nabs_event_study() | What about csdid / did_imputation / xtevent? | 4. Stata-style argument aliases | 5. Getting results out: nabs_write_dta() | Reproducibility checklist

Last update: 2026-06-13
Started: 2026-06-13

Getting started with nonabsdid
The 30-second version | A simulated panel | Three estimators, three lines of code | Or call the estimators directly | Naive TWFE reference | Plot | Plot styles | Schema

Last update: 2026-06-09
Started: 2026-05-01

Readme and manuals

Help Manual

Help pageTopics
Collapse effect cells back onto an event-study pathaggregate_effects
Coerce an estimator result to a tidy cohort-by-time effect-cell tibbleas_nabs_effect_cells as_nabs_effect_cells.data.frame as_nabs_effect_cells.did_multiplegt_dyn as_nabs_effect_cells.fect
Coerce an estimator result to a tidy event-study tibbleas_nabs_event_study as_nabs_event_study.did_multiplegt_dyn as_nabs_event_study.fect as_nabs_event_study.fixest as_nabs_event_study.list as_nabs_event_study.nabs_event_study_result as_nabs_event_study.nabs_event_study_simple as_nabs_event_study.PanelEstimate
Fit an estimator and return cohort-by-time effect cellsnabs_effect_cells
Plot one or more event-study tibbles on a single panelnabs_event_plot
Run an event-study estimator with a unified interfacenabs_event_study
One-line exploratory front door for non-absorbing event studiesnabs_event_study_simple
Read a Stata .dta file into an analysis-ready data framenabs_read_dta
Write event-study results to a Stata .dta filenabs_write_dta
Estimate a naive two-way fixed-effects (TWFE) event studynaive_twfe
Plot a cohort-by-time effect matrix as a heatmapplot_effect_matrix