TWFEDEC: Stata module to compute Two-way fixed effects coefficient as a weighted average of first-difference coefficients
Shoya Ishimaru
Statistical Software Components from Boston College Department of Economics
Abstract:
twfedec decomposes the coefficient on a scalar treatment in a two-way fixed effects (TWFE) regression on a balanced panel, following Ishimaru (2026, The Econometrics Journal, Theorem 2.2). The TWFE coefficient equals a weighted average of k-period first-difference (FD) coefficients over all horizons k = 1, ..., T-1; with time-varying covariates, an adjustment term is added. twfedec reports the TWFE coefficient, the FD coefficients, the weights, and the adjustment term, and optionally plots the FD coefficients and weights by horizon.
Language: Stata
Requires: Stata version 15 and reghdfe, ftools from SSC (q.v.)
Keywords: panel data; TWFE; fixed effects (search for similar items in EconPapers)
Date: 2026-09-25
Note: This module should be installed from within Stata by typing "ssc install twfedec". 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/t/twfedec.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/t/twfedec.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/t/twfedec_example.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:s459903
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 ().