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

print(<AGGTEobj>)

print.AGGTEobj

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

build_sim_dataset()

build_sim_dataset

reset.sim()

reset.sim

sim()

sim

trimmer()

trimmer

glance(<AGGTEobj>)

glance model characteristics from AGGTEobj objects

glance(<MP>)

glance model characteristics from MP objects

tidy(<AGGTEobj>)

tidy results from AGGTEobj objects

tidy(<MP>)

tidy results from MP objects

Data

Available datasets in the package

mpdta

County Teen Employment Dataset

Package Documentation

did

Difference in Differences