Difference-in-Differences Methods

Tools to compute average treatment effects, particularly in the case with multiple periods and variation in treatment timing

att_gt()

Group-Time Average Treatment Effects

aggte()

Aggregate Group-Time Average Treatment Effects

Pre-Testing

Tools to compute “pre-test” the DiD assumption in the case where multiple periods are available

conditional_did_pretest()

Pre-Test of Conditional Parallel Trends Assumption

Plotting and Summarizing

Tools for plotting and summarizing the results of the att_gt method and aggte method

ggdid()

Plot did objects using ggplot2

ggdid(<MP>)

Plot MP objects using ggplot2

ggdid(<AGGTEobj>)

Plot AGGTEobj objects

summary(<MP>)

summary.MP

summary(<AGGTEobj>)

Summary Aggregate Treatment Effect Parameter Objects

summary(<MP.TEST>)

summary.MP.TEST

print(<MP>)

print.MP

Classes

Classes available in the did package

MP()

MP

AGGTEobj()

AGGTEobj

MP.TEST()

MP.TEST

DIDparams()

DIDparams

Helper Functions

A number of other miscellaneous helper functions

mboot()

Multiplier Bootstrap

test.mboot()

Multiplier Bootstrap for Conditional Moment Test

pre_process_did()

Process did Function Arguments

process_attgt()

Process Results from compute.att_gt()

indicator()

indicator

Data

Available datasets in the package

mpdta

County Teen Employment Dataset

Package Documentation

did

Difference in Differences

Deprecated Functions

Functions that are being replaced in version 2.0.0

mp.spatt()

Group-Time Average Treatment Effects with Multiple Periods

mp.spatt.test()

mp.spatt.test