EconPapers    
Economics at your fingertips  
 

DIDDESIGN: Stata module to perform Double Difference-in-Differences Estimation

Xuanyu Cai () and Wenli Xu ()
Additional contact information
Xuanyu Cai: City University of Macau
Wenli Xu: City University of Macau

Statistical Software Components from Boston College Department of Economics

Abstract: diddesign implements the Double Difference-in-Differences (Double DID) method from Egami and Yamauchi (2023). The method optimally combines the standard DID estimator with the sequential DID (s-DID) estimator using GMM weights to improve efficiency while maintaining robustness. For standard DID designs (design(did)), the command estimates both DID and s-DID, then computes the GMM-optimal weighted combination (Double DID). When kmax() is set to a value greater than 2 and sufficient pre-treatment periods are available, the command uses the generalized K-DID estimator from Appendix E of Egami and Yamauchi (2023), combining up to K moment conditions via GMM. The k-th component uses the k-th order parallel trends assumption, which can account for (k-1)-th degree polynomial time-varying confounding. For staggered adoption (SA) designs (design(sa)), the command handles multiple treatment timing groups and computes time-weighted averages across cohorts.

Language: Stata
Requires: Stata version 16
Keywords: DiD; double difference in difference (search for similar items in EconPapers)
Date: 2026-06-27
Note: This module should be installed from within Stata by typing "ssc install diddesign". The module is made available under terms of the MIT license (https://opensource.org/licenses/MIT).
References: Add references at CitEc
Citations:

Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/d/diddesign.ado
http://fmwww.bc.edu/repec/bocode/d/diddesign.sthlp
http://fmwww.bc.edu/repec/bocode/_/_diddesign_display_footer.ado
http://fmwww.bc.edu/repec/bocode/_/_diddesign_display_header.ado
http://fmwww.bc.edu/repec/bocode/_/_diddesign_display_result.ado
http://fmwww.bc.edu/repec/bocode/_/_diddesign_display_table_header.ado
http://fmwww.bc.edu/repec/bocode/_/_diddesign_error.ado
http://fmwww.bc.edu/repec/bocode/_/_diddesign_expand_covariates.ado
http://fmwww.bc.edu/repec/bocode/_/_diddesign_load_mata.ado
http://fmwww.bc.edu/repec/bocode/_/_diddesign_parallel_boot.ado
http://fmwww.bc.edu/repec/bocode/_/_diddesign_parallel_worker.ado
http://fmwww.bc.edu/repec/bocode/_/_diddesign_parse.ado
http://fmwww.bc.edu/repec/bocode/_/_diddesign_prep.ado
http://fmwww.bc.edu/repec/bocode/_/_diddesign_sa.ado
http://fmwww.bc.edu/repec/bocode/_/_diddesign_utils.ado
http://fmwww.bc.edu/repec/bocode/_/_diddesign_warning.ado
http://fmwww.bc.edu/repec/bocode/c/compile_mlib.do
http://fmwww.bc.edu/repec/bocode/d/diddesign_check.ado
http://fmwww.bc.edu/repec/bocode/d/diddesign_mata.do
http://fmwww.bc.edu/repec/bocode/d/diddesign_plot.ado
http://fmwww.bc.edu/repec/bocode/d/diddesign_check.sthlp
http://fmwww.bc.edu/repec/bocode/d/diddesign_intro.sthlp
http://fmwww.bc.edu/repec/bocode/d/diddesign_plot.sthlp
http://fmwww.bc.edu/repec/bocode/e/example_kdid.do
http://fmwww.bc.edu/repec/bocode/e/example_malesky.do
http://fmwww.bc.edu/repec/bocode/e/example_paglayan.do
http://fmwww.bc.edu/repec/bocode/m/malesky2014.dta
http://fmwww.bc.edu/repec/bocode/p/paglayan2019.dta

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:boc:bocode:s459771

Ordering information: This software item can be ordered from
http://repec.org/docs/ssc.php

Access Statistics for this software item

More software in Statistical Software Components from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().

 
Page updated 2026-06-28
Handle: RePEc:boc:bocode:s459771