Skip to contents

Estimators

Fit fused extended two-way fixed effects (FETWFE) and its comparison estimators for difference-in-differences with staggered adoptions.

fetwfe()
Fused extended two-way fixed effects
etwfe()
Extended two-way fixed effects
betwfe()
Bridge-penalized extended two-way fixed effects
twfeCovs()
Two-way fixed effects with covariates and a single pooled treatment effect per cohort

Inference

Confidence intervals and debiased overall-ATT inference.

debiasedATT()
Debiased overall-ATT with a uniformly-valid standard error
simultaneousCIs()
Parametric simultaneous (1 - alpha) confidence intervals over a family of treatment effects

Treatment-effect summaries

Extract cohort, event-study, and cohort-by-time treatment effects.

getTes()
Compute True Treatment Effects
cohortStudy()
Per-cohort average treatment effects
eventStudy()
Compute pooled event-time treatment-effect estimates
cohortTimeATTs()
Per-(cohort, time) average treatment effects

Simulation

Generate coefficients and panel data for simulation studies.

genCoefs()
Generate Coefficient Vector for Data Generation
genCoefsCore()
Generate Coefficient Vector for Data Generation (core)
simulateData()
Generate Random Panel Data for FETWFE Simulations
simulateDataCore()
Generate Random Panel Data for FETWFE Simulations (core)

Fit on simulated data

Convenience drivers that fit directly on simulateData() output.

fetwfeWithSimulatedData()
Run FETWFE on Simulated Data
etwfeWithSimulatedData()
Run ETWFE on Simulated Data
betwfeWithSimulatedData()
Run BETWFE on Simulated Data
twfeCovsWithSimulatedData()
Run twfeCovs on Simulated Data
debiasedATTWithSimulatedData()
Run debiasedATT() on simulated data

Data conversion

Convert data frames from other DiD packages into the FETWFE format.

attgtToFetwfeDf()
Convert data formatted for att_gt() to a dataframe suitable for fetwfe() / etwfe()
etwfeToFetwfeDf()
Convert data prepared for etwfe::etwfe() to the format required by fetwfe() and fetwfe::etwfe()

Methods

broom (tidy / glance / augment) and base S3 methods (plot, print) for the fitted objects.

tidy(<FETWFE_tes>)
Tidy a FETWFE_tes simulation truth object
tidy(<betwfe>)
Tidy a betwfe fitted object
tidy(<cohortStudy>)
Tidy a cohortStudy object
tidy(<cohortTimeATTs>)
Tidy a cohortTimeATTs object
tidy(<debiased_att>)
Tidy a debiased overall-ATT estimate
tidy(<etwfe>)
Tidy an etwfe fitted object
tidy(<eventStudy>)
Tidy an eventStudy object
tidy(<fetwfe>)
Tidy an fetwfe fitted object
tidy(<simultaneous_cis>)
Tidy a simultaneous-confidence-interval object
tidy(<twfeCovs>)
Tidy a twfeCovs fitted object
glance(<betwfe>)
Glance a betwfe fitted object
glance(<etwfe>)
Glance an etwfe fitted object
glance(<fetwfe>)
Glance an fetwfe fitted object
glance(<twfeCovs>)
Glance a twfeCovs fitted object
augment(<betwfe>)
Augment user-supplied data with fitted values and residuals from a betwfe fit
augment(<etwfe>)
Augment user-supplied data with fitted values and residuals from an etwfe fit
augment(<fetwfe>)
Augment user-supplied data with fitted values and residuals from a fetwfe fit
augment(<twfeCovs>)
Augment is not defined for a twfeCovs fit (documented omission)
plot(<betwfe>)
Plot CATT or event-study estimates from a fitted BETWFE
plot(<etwfe>)
Plot CATT or event-study estimates from a fitted ETWFE
plot(<fetwfe>)
Plot CATT or event-study estimates from a fitted FETWFE / ETWFE / BETWFE
plot(<simultaneous_cis>)
Plot a simultaneous-confidence-interval object
plot(<twfeCovs>)
Plot is not defined for a twfeCovs fit (documented omission)
print(<debiased_att>)
Print a debiased overall-ATT estimate
print(<simultaneous_cis>)
Print a simultaneous-confidence-interval object

Classes and low-level accessors

Class definitions and the catt_df element accessors.

FETWFE_coefs-class
FETWFE Coefficient-Vector Class
FETWFE_simulated-class
Simulated Panel-Data Class
FETWFE_tes-class
Compute True Treatment Effects Output Class
betwfe-class
Bridge-Penalized Extended Two-Way Fixed Effects Output Class
etwfe-class
Extended Two-Way Fixed Effects Output Class
fetwfe-class
Fused Extended Two-Way Fixed Effects Output Class
twfeCovs-class
TWFE-With-Covariates Output Class
`$`(<catt_df>)
Dollar-sign access on a catt_df object
`$<-`(<catt_df>)
Dollar-sign assignment on a catt_df object
`[`(<catt_df>)
Single-bracket access on a catt_df object
`[[`(<catt_df>)
Double-bracket access on a catt_df object
`[[<-`(<catt_df>)
Double-bracket assignment on a catt_df object
`[<-`(<catt_df>)
Single-bracket assignment on a catt_df object