Skip to content

did2s

1.2.1Package record

Two-Stage Difference-in-Differences Following Gardner (2021)

0packages depend
18.3Kdownloads / year
66.0%test coverage
13/13flavors OK

Overview

About

Estimates Two-way Fixed Effects difference-in-differences/event-study models using the approach proposed by Gardner (2021) doi:10.48550/arXiv.2207.05943. To avoid the problems caused by OLS estimation of the Two-way Fixed Effects model, this function first estimates the fixed effects and covariates using untreated observations and then in a second stage, estimates the treatment effects.

Install

Health

CRAN checks
13OK
Slowest check: 2.5 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK13 OK2026-05-02
Show 2 earlier changesHide 2 earlier changes
  • ERROR11 OK, 1 ERROR2026-04-25
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.2.1
READMEYes · 579 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · does not mention 1.2.1Citation fileYes · software entry onlyWebsiteYes · pkgdown
Help pages
9
Examples that run
50%1 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
40%
Documented parameters
100%
Return-value docs
80%
Help pages citing references
0%

Downloads

18.3K
CRAN downloads in the past year
Rank #2,501 · ~50/day · ~1.5K/mo
Daily download trend is not available in this view yet.
3K30 days
6.3K90 days
18.3K1 year
Compare downloads with other packages →
Also on576 r2u14 autocran

Repository

113Stars
27Forks
4Open issues
2Open PRs
0Releases
152Commits
7Commit identities
152 commits · Last activity 2026-09-20 · +0.9% stars, 30d · Default branch at 1.3.0, ahead of CRAN 1.2.1 (checked 2026-10-11)
Responsiveness
How these are sampled
PRs merged (all time)
70%
Median days to close, 50 most recently updated closed issues
1
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-09-25 · 1062026-10-13 · 113
PracticesBeta

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

Checks run against github.com/kylebutts/did2s on 2026-10-11.

Docs source (3)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-09-20

pkgdown site last built 2023-03-28, before release 1.2.1 (2026-03-05)

Reproducibility and dev environment (1)
data-raw/
CRAN release process (1)
cran-comments.md
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
14 external dependencies (excludes base and recommended)

Installing did2s adds 77 packages (46 with compiled code, 93 MB of source tarballs). Heaviest: BH 14 MB, stringi 11 MB, ggplot2 6.0 MB.

Depends (2)
R >= 3.5.0fixest
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (4)
Author, Maintainer since 0.4.0 (2021)
Contributor · added in 0.6.0
Contributor
Releases (8)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.2.1Latest
    record
    2026-03-05 · current release · diff ↗
  • 1.2.0
    record
    2025-09-19 · diff ↗ ·
    added 2 exports
    get_honestdid_obj_did2s, honest_did_did2s
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 1.0.2
    record
    2023-04-07 · diff ↗
  • 1.0.1
    record
    2023-03-28 · diff ↗
  • 1.0.0
    record
    2023-03-11 · diff ↗
  • unarchivedReturned to CRAN
    2022-07-21
  • 0.7.0
    record
    2022-07-21 · diff ↗
  • archivedRemoved from CRAN
    2022-07-09
    requires archived package 'did'
  • R
    R 4.2.0 released · 2022-04-22
  • 0.6.0
    record
    2022-04-07 · diff ↗ ·
    removed 1 export
    %>%
  • 0.4.0
    record
    2021-09-27
  • R
    R 4.1.0 released · 2021-05-18

Package metadata

First published
2021-09-27
Total releases
8 / 5 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 3.5.0
Bundled data
1.5 MB / 3 files
Download size
3.3 MB
Appears in task views

Cite

Cite this package

Run in R for the authors' entry:

citation("did2s")

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

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 did2s version 1.2.1 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

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