Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [2.6.1] - 2026-03-08

### Added
- Short aliases for all estimators (e.g., `DID`, `TWFE`, `MPID`, `CSAN`, `SDID`)
- Short aliases for all estimators (e.g., `DiD`, `TWFE`, `EventStudy`, `CS`, `SDiD`)

### Changed
- Update roadmap for v2.6.0: reflect completed work and refresh priorities
Expand Down
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pip install -e .

```python
import pandas as pd
from diff_diff import DifferenceInDifferences
from diff_diff import DifferenceInDifferences # or: DiD

# Create sample data
data = pd.DataFrame({
Expand Down Expand Up @@ -84,6 +84,28 @@ Signif. codes: '***' 0.001, '**' 0.01, '*' 0.05, '.' 0.1
- **Data prep utilities**: Helper functions for common data preparation tasks
- **Validated against R**: Benchmarked against `did`, `synthdid`, and `fixest` packages (see [benchmarks](docs/benchmarks.rst))

## Estimator Aliases

All estimators have short aliases for convenience:

| Alias | Full Name | Method |
|-------|-----------|--------|
| `DiD` | `DifferenceInDifferences` | Basic 2x2 DiD |
| `TWFE` | `TwoWayFixedEffects` | Two-way fixed effects |
| `EventStudy` | `MultiPeriodDiD` | Event study / multi-period |
| `CS` | `CallawaySantAnna` | Callaway & Sant'Anna (2021) |
| `SA` | `SunAbraham` | Sun & Abraham (2021) |
| `BJS` | `ImputationDiD` | Borusyak, Jaravel & Spiess (2024) |
| `Gardner` | `TwoStageDiD` | Gardner (2022) two-stage |
| `SDiD` | `SyntheticDiD` | Synthetic DiD |
| `DDD` | `TripleDifference` | Triple difference |
| `CDiD` | `ContinuousDiD` | Continuous treatment DiD |
| `Stacked` | `StackedDiD` | Stacked DiD |
| `Bacon` | `BaconDecomposition` | Goodman-Bacon decomposition |
| `EDiD` | `EfficientDiD` | Efficient DiD |

`TROP` already uses its short canonical name and needs no alias.

## Tutorials

We provide Jupyter notebook tutorials in `docs/tutorials/`:
Expand Down
20 changes: 10 additions & 10 deletions docs/api/estimators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Most estimators have short aliases (``TROP`` already uses its short canonical na

.. module:: diff_diff.estimators

DifferenceInDifferences
-----------------------
DifferenceInDifferences (alias: ``DiD``)
----------------------------------------

Basic 2x2 DiD estimator.

Expand All @@ -44,8 +44,8 @@ Basic 2x2 DiD estimator.
~DifferenceInDifferences.get_params
~DifferenceInDifferences.set_params

MultiPeriodDiD
--------------
MultiPeriodDiD (alias: ``EventStudy``)
--------------------------------------

Event study estimator with period-specific treatment effects.

Expand All @@ -55,8 +55,8 @@ Event study estimator with period-specific treatment effects.
:show-inheritance:
:inherited-members:

TwoWayFixedEffects
------------------
TwoWayFixedEffects (alias: ``TWFE``)
-------------------------------------

Panel DiD with unit and time fixed effects.

Expand All @@ -68,8 +68,8 @@ Panel DiD with unit and time fixed effects.
:show-inheritance:
:inherited-members:

SyntheticDiD
------------
SyntheticDiD (alias: ``SDiD``)
------------------------------

Synthetic control combined with DiD (Arkhangelsky et al. 2021).

Expand All @@ -81,8 +81,8 @@ Synthetic control combined with DiD (Arkhangelsky et al. 2021).
:show-inheritance:
:inherited-members:

TripleDifference
----------------
TripleDifference (alias: ``DDD``)
----------------------------------

Triple Difference (DDD) estimator for settings where treatment requires two criteria
(Ortiz-Villavicencio & Sant'Anna, 2025).
Expand Down
9 changes: 7 additions & 2 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ The simplest DiD design has two groups (treated/control) and two periods (pre/po
import pandas as pd
from diff_diff import DifferenceInDifferences, generate_did_data

# Tip: most estimators have short aliases, e.g. DiD, TWFE, CS, DDD
# from diff_diff import DiD
.. tip::

Most estimators have short aliases for convenience — e.g.
``from diff_diff import DiD, TWFE, CS, DDD``.
See the :doc:`API reference <api/estimators>` for the full list.

.. code-block:: python

# Generate synthetic data with a known treatment effect
data = generate_did_data(
Expand Down