did2.3.0 package

Treatment Effects with Multiple Periods and Groups

aggte

Aggregate Group-Time Average Treatment Effects

AGGTEobj

AGGTEobj

att_gt

Group-Time Average Treatment Effects

build_sim_dataset

build_sim_dataset

citation

citation

compute.aggte

Compute Aggregated Treatment Effect Parameters

compute.att_gt

Compute Group-Time Average Treatment Effects

compute.att_gt2

Compute Group-Time Average Treatment Effects

conditional_did_pretest

Pre-Test of Conditional Parallel Trends Assumption

did-package

Difference in Differences

DIDparams

DIDparams

get_agg_inf_func

Get an influence function for particular aggregate parameters

getSE

Take influence function and return standard errors

ggdid.AGGTEobj

Plot AGGTEobj objects

ggdid.MP

Plot MP objects using ggplot2

ggdid

Plot did objects using ggplot2

glance.AGGTEobj

glance model characteristics from AGGTEobj objects

glance.MP

glance model characteristics from MP objects

gplot

gplot

indicator

indicator

mboot

Multiplier Bootstrap

MP

MP

MP.TEST

MP.TEST

pre_process_did

Process did Function Arguments

pre_process_did2

Process did Function Arguments

print.AGGTEobj

print.AGGTEobj

print.MP

print.MP

process_attgt

Process Results from compute.att_gt()

reexports

tidy results

reset.sim

reset.sim

run_att_gt_estimation

Run ATT estimation for a given group-time pair

sim

sim

splot

splot

summary.AGGTEobj

Summary Aggregate Treatment Effect Parameter Objects

summary.MP

summary.MP

summary.MP.TEST

summary.MP.TEST

test.mboot

Multiplier Bootstrap for Conditional Moment Test

tidy.AGGTEobj

tidy results from AGGTEobj objects

tidy.MP

tidy results from MP objects

trimmer

trimmer

wif

Compute extra term in influence function due to estimating weights

The standard Difference-in-Differences (DID) setup involves two periods and two groups -- a treated group and untreated group. Many applications of DID methods involve more than two periods and have individuals that are treated at different points in time. This package contains tools for computing average treatment effect parameters in Difference in Differences setups with more than two periods and with variation in treatment timing using the methods developed in Callaway and Sant'Anna (2021) <doi:10.1016/j.jeconom.2020.12.001>. The main parameters are group-time average treatment effects which are the average treatment effect for a particular group at a a particular time. These can be aggregated into a fewer number of treatment effect parameters, and the package deals with the cases where there is selective treatment timing, dynamic treatment effects, calendar time effects, or combinations of these. There are also functions for testing the Difference in Differences assumption, and plotting group-time average treatment effects.

  • Maintainer: Brantly Callaway
  • License: GPL-2
  • Last published: 2025-12-13