Skip to content

nonabsdid package #778

Description

@takuma1102

Submitting Author Name: Takuma Iwasaki
Submitting Author Github Handle: @takuma1102
Repository: https://github.com/takuma1102/nonabsdid
Submission type: Pre-submission
Language: en


  • Paste the full DESCRIPTION file inside a code block below:
Package: nonabsdid
Type: Package
Title: Visualize Heterogeneity-Robust Event Studies for Non-Absorbing Treatments
Version: 0.3.2.9004
Authors@R: c(
    person(given = "Takuma",
           family = "Iwasaki",
           role = c("aut", "cre"),
           email = "iwasakit@stanford.edu",
           comment = c(ORCID = "0009-0000-8782-4851"))
    )
Description: Runs several heterogeneity-robust difference-in-differences (DID) event-study estimators
    for non-absorbing (i.e., treatment can switch on and off) binary treatments through their own 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.
License: MIT + file LICENSE
Encoding: UTF-8
Depends:
    R (>= 4.1.0)
Imports:
    cli,
    dplyr,
    ggplot2,
    rlang,
    stats,
    tibble
Suggests:
    DIDmultiplegtDYN,
    polars,
    PanelMatch,
    fect,
    fixest,
    haven,
    knitr,
    rmarkdown,
    testthat (>= 3.0.0),
    vdiffr,
    withr
Config/testthat/edition: 3
URL: https://github.com/takuma1102/nonabsdid
BugReports: https://github.com/takuma1102/nonabsdid/issues
VignetteBuilder: knitr
Additional_repositories: https://rpolars.r-universe.dev
Config/roxygen2/version: 8.0.0

Scope

  • Please indicate which category or categories from our package fit policies or statistical package categories this package falls under. (Please check one or more appropriate boxes below):

    Data Lifecycle Packages

    • data retrieval
    • data extraction
    • data munging
    • data deposition
    • data validation and testing
    • workflow automation
    • version control
    • citation management and bibliometrics
    • scientific software wrappers
    • field and lab reproducibility tools
    • database software bindings
    • geospatial data
    • translation

    Statistical Packages

    • Bayesian and Monte Carlo Routines
    • Dimensionality Reduction, Clustering, and Unsupervised Learning
    • Machine Learning
    • Regression and Supervised Learning
    • Exploratory Data Analysis (EDA) and Summary Statistics
    • Spatial Analyses
    • Time Series Analyses
    • Probability Distributions
  • Explain how and why the package falls under these categories (briefly, 1-2 sentences). Please note any areas you are unsure of:
    This package concerns staggered DID's event-study, so Regression and Supervised Learning category would be the right category. While this package does not implement a new estimator, it standardizes, compares, and visualizes the output of existing estimator packages.

  • If submitting a statistical package, have you already incorporated documentation of standards into your code via the srr package?
    Not yet. After confirming my package is within this review category, I will do so.

  • Who is the target audience and what are scientific applications of this package?
    This package provides applied causal inference researchers with a single interface over four typical estimator packages used in applied econometrics for staggered, non-absorbing binary treatments. The package lowers the barrier to running and comparing modern heterogeneity-robust estimators, which currently have incompatible interfaces and output formats.

  • Are there other R packages that accomplish the same thing? If so, how does yours differ or meet our criteria for best-in-category?
    No. Another R package (https://kylebutts.github.io/did2s/) has a similar function for another DID model, which is absorbing treatment's staggered DID, but for non-absorbing treatment, there is no comparable package.

  • (If applicable) Does your package comply with our guidance around Ethics, Data Privacy and Human Subjects Research?
    Yes. This package operates only on user-supplied panel data: it embeds no datasets, collects no data, and transmits nothing over the network. It does not itself involve human subjects, and it imposes no data-privacy concerns of its own.

  • Any other questions or issues we should be aware of?:
    Lifecycle: currently experimental; I plan to move to stable before any full submission.
    The package is already on CRAN (an older version); the GitHub version is the latest.

Use of Generative AI

  • [ ✓] Generative AI tools were used to produce some of the material in this submission.

If so, please describe usage, and include links to any relevant aspects of your repository. See our blog post for background. (Explicit advice is not yet included in our Dev Guide; we are hoping to update very soon, and ask your cooperation and transparency in the meantime.)

Generative AI tools were used in the following manners and contexts, but all AI-assisted coding has been read, understood, edited, and confirmed by the author (me). I take full responsibility for the correctness of everything in the package. In this submission's package, I used an LLM to help draft coding, review, and debug, but finally I, as the maintainer of this package, reviewed and edited all of them.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions