R里有几个package可以进行动态面板回归,比如plm和panelvar。但是前者在System GMM中不支持常数项,后者太慢。
pydynpd是个python package,可以对动态面板模型进行回归。包含的功能如下:
- Differene and System GMM
- One-step, two-step, and iterative estimates
- First-difference and forward orthogonal deviation transformations
- Robust standard errors. For two-step GMM, the calculation suggested by Windmeijer (2005) is used.
- Hansen over-identification test
- Arellano-Bond test for autocorrelation
- Time dummies
- Collapse GMM instruments to limit instrument proliferation
- Search for models based on users' request, rather than just run the model specified by users as other packages do
回归结果和Stata中的xtabond2相同。即便在R中调用这个Python package, 速度仍然比调用R package panelvar快几十倍。在Python和R环境中安装使用可参考
https://github.com/dazhwu/pydynpd