skip to content

Faculty of Economics

CWPE Cover

Jochmans, K. and Verardi, V.

twexp and twgravity: Estimating exponential regression models with two-way fixed effects

CWPE1945

Abstract: We introduce the commands twexp and twgravity that implement the estimators developed in Jochmans (2017) for exponential regression models with two-way fixed effects. twexp is applicable to generic n x m panel data. twgravity is written for the special case where the data is a cross-section on dyadic interactions between n agents. A prime example of the latter is cross-sectional bilateral trade data, where the model of interest is a gravity equation with importer and exporter effects. Both twexp and twgravity can deal with data where n and m are large, that is, the case of many fixed effects. They make use of Mata and are very fast to execute.

Keywords: exponential regression, gravity model, panel data, two-way fixed effects

JEL Codes: C33 C87

Author links:

PDF: https://www.econ.cam.ac.uk/research-files/repec/cam/pdf/cwpe1945.pdf

Open Access Link: https://doi.org/10.17863/CAM.40109


Published Version of Paper: twexp and twgravity: Fitting Exponential Regression Models with Two-way Fixed Effects, Jochmans, K. and Verardi, V., Stata Journal (2020)

<< CWPE Home | CWPE List 2019 >>