Skip to content

staggeredGMM

0.1.0Package record

GMM Estimation of Treatment Effects Under Staggered Adoption

0packages depend
578downloads / year
90.0%test coverage
13/13flavors OK

Overview

About

Estimates cohort-by-time average treatment effects under staggered treatment adoption by the generalized method of moments. Three weighting schemes are provided, corresponding to a pooled stationary covariance, a cohort-specific stationary covariance, and an unrestricted within-cohort covariance. Optional adjustment for baseline covariates by outcome regression, and a serial-correlation robust over-identification test of parallel trends and no anticipation, are also supported. The methods are described in Arora and Bijani (2026) doi:10.2139/ssrn.6558759.

Changes in 0.1.0

First release.

Interface

  • Single exported estimator gmm_staggered(), replacing the earlier gmm_staggered_I(), gmm_staggered_II() and gmm_staggered_III(). The covariance model is chosen with weighting, one of "pooled_toeplitz", "cohort_toeplitz" or "unrestricted" (GMM-T, GMM-HT and GMM-U in the paper).
  • Argument names follow the did package convention: yname, tname, idname, gname.
  • never_treated = NULL detects a never-treated group automatically, replacing has_nt = FALSE.
  • Results are an S3 object of class staggered_gmm with print, summary, coef, vcov and confint methods.
Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
  • New gmm_j_test(): the serial-correlation robust over-identification test of parallel trends and no anticipation, in full-set and local-pre-window forms.

Estimation

  • Both aggregate targets are reported: CW (treated-observation weighting, as used throughout the paper) and EW (cohort-equal weighting).
  • Cohort-by-time effects with no clean comparison are reported as NA with identified = FALSE, never as an estimated zero, and are excluded from the parameter vector so that partial identification no longer disables the efficient weighting for every other cell.
  • Unbalanced panels are supported: autocovariances use pairwise-complete denominators, and the variance of a group-period mean accounts for the overlap between the unit sets contributing at each pair of periods. Both reduce exactly to the complete-data formulas when the panel is balanced.
  • Convergence and solve success are reported separately, with a termination reason and the final parameter change. max_iter now defaults to 100: the iteration can converge linearly at a slow rate, and sim_panel under weighting = "cohort_toeplitz" needs 86 steps.
  • Failure to complete any weighted step always warns, including under weighting = "unrestricted", because the returned estimates are then the identity-weighted seed rather than a GMM estimate under the requested weighting. The warning reports how many independent moment directions the estimated weight supported, against the number of effects to identify. Merely failing to converge after a weighted step did run continues not to warn under "unrestricted", where it is routine.
  • Units whose cohort falls after the last observed period are used as clean controls rather than discarded.

Validation

  • A shared validator checks every documented requirement before estimation and reports the offending rows, units, periods or cohorts. Column types are rejected rather than coerced.
  • Units treated at or before the first observed period now raise an error. They have no pre-treatment period, so none of their effects is identified.

Data

  • beck_banks documentation now records its CC BY 4.0 licence and the thirteen always-treated states it contains.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 4.2 min · r-release-macos-x86_64
Status changes
  • OK13 OKNow
  • OK7 OK2026-09-16
Advisories

none known

Documentation

In release 0.1.0
READMEYes · 284 wordsVignettesYes · 1 · dynamicNEWSYes · 67% structured · mentions 0.1.0Citation fileYes · cites a publicationWebsitenot declared in DESCRIPTION
Help pages
11 (1 internal)includes a package overview page
Examples that run
100%8 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
27%

Downloads

578
CRAN downloads in the past year
Rank #22,724 · ~2/day · ~48/mo
Daily download trend is not available in this view yet.
46930 days
57890 days
5781 year
Compare downloads with other packages →
Also on7 r2u2 autocran

Repository

0Stars
0Forks
0Open issues
0Open PRs
0Releases
Last activity 2026-09-06
Responsiveness
not measured
PracticesBeta

8 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/rishabhbijani/staggeredgmm on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (1)
README.Rmd
Coverage (1)
Coverage reporting
Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 2 practices
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Research and citation (1)
CITATION.cff
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
6 external dependencies (excludes base and recommended)

Installing staggeredGMM adds 8 packages (4 with compiled code, 13 MB of source tarballs). Heaviest: fixest 4.8 MB, stringmagic 3.2 MB, Rcpp 1.8 MB.

Depends (1)
R >= 4.1.0
Imports (4)
fixestMASSstatsutils
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (2)
Author, Maintainer since 0.1.0 (2026), Copyright holder
Author, Copyright holder
Releases (1)
  • 0.1.0Latest
    2026-09-15 · current release
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-09-15
Total releases
1 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Bundled data
43 KB / 2 files
Download size
107 KB

Cite

Cite this package

Run in R for the authors' entry:

citation("staggeredGMM")

The package provides a citation file, so citation() returns the authors' own entry.

It points to 10.2139/ssrn.6558759.

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.

APA

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

From data release v2026-10-22, 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