- Current version:
1.2 06mar2021
- Jump to:
citation
example output
install
- Also see: Help file | Examples |
ado file
|ppmlhdfe
ppml_fe_bias is a Stata package that implements analytical bias corrections described in Weidner and Zylkin (2021) for PPML “gravity” regressions with two-way and three-way fixed effects, as are commonly used with international trade data and other types of spatial flows. As shown in Weidner and Zylkin (2021), when the time dimension is fixed, the point estimates produced by three-way PPML gravity have an asymptotic incidental parameter bias of order 1/N, where N is the number of countries, and the cluster-robust sandwich estimator that is typically used for inference itself has a downward bias that is also of order 1/N. For the two-way PPML gravity model, only the standard errors are biased.
- v.1.2 March 6, 2021. Edits made to documentation for clarity and to update references.
- v.1.1 June 2, 2020. Leverage calculations needed for standard error corrections are now faster and more memory-efficient. Fixed a bug for two-way models. Streamlined code in other places and made some comments clearer.
Three-way fixed effects example
Two-way fixed effects example
These examples follow the included .do file and data set. Note that only the standard errors are biased in the case of the two-way model. In the three-way model, the point estimates also suffer from some bias.
Weidner, Martin, and Thomas Zylkin. "Bias and consistency in three-way gravity models." Journal of International Economics 132 (2021): 103513.
ppml_fe_bias
requires the latest versions of hdfe
, gtools
, rowmat_utils
, and frmttable
To install from within Stata, there are two options. To install the latest version from the official SSC repository, type
ssc install ppml_fe_bias, replace
Or, to install from github, type:
net install ppml_fe_bias, from("https://raw.githubusercontent.com/tomzylkin/ppml_fe_bias/master/src") replace
You will also need to make sure the following packages are installed:
ssc install outreg, replace
ssc install hdfe, replace
ssc install gtools, replace
ssc install rowmat_utils, replace
After installing, you can then access a help file with more information in the standard way by typing
help ppml_fe_bias
An online version of this help file with additional details is also available here.