Is there a solution coded in R to estimate models of the form
$$ y_{igt} = \alpha_i + P_{gt} + \beta_1y_{igt-1}+ \beta_2y_{igt-2} + X_{igt}'\gamma + \epsilon_{igt} $$ ?
plm
offers the pgmm
package, which implements the Arellano-Bond estimator, but it doesn't seem able to handle FWL-based demeaning of factors other than the cross-sectional unit, or the simple addition of time dummies. lfe
on the other hand doesn't seem to be able to handle dynamic panel GMM estimators.
I've got N= 2000, n = 65K, G = 39, and t = 25, so including time:group
effects as simple factor variables is not an option, particularly given that I'll need to fit multiple models to figure out what lag structure I need to wipe out the autocorrelation.
If nothing is coded yet, can anyone recommend any clever workarounds?