1

Let´s suppose I have a simple AR(1) panel data model I estimate with the pgmm command in R - data available :

library(plm)
library(Ecdat)
data(Airline)

reg.gmm = pgmm(output ~ lag(output, 1)| lag(output, 2:99), data= Airline, Robust=TRUE)

With Robust=TRUE I use the Windmeijer(2005) correction to the variance-covariance matrix. Now I want to test for second order autocorrelation using Arrelano-Bond:

mtest(reg.gmm, order = 2, vcov = reg.gmm$vcov)

Am I using the Windmeijer-corrected variance-covariance matrix, as I intend to? If not, how can I implement it? The documentation is quite tight-lipped on that topic. Thanks for any help in advance!

  • For me your code throws the following error: `Error in solve.default(crossprod(WX, t(crossprod(WX, A2)))) : system is computationally singular: reciprocal condition number = 3.5216e-19` which is likely to be related to a problem concerning too many instruments in your sample data. – juljo Sep 21 '20 at 11:45
  • Since you are right about the documentation being quite limited on these types of concerns. I've found the book by the authors of the `plm` package to be a very helpful resource with much more detailed explanations and examples. It's called: "Panel Data Econometrics with R" by Yves Croissant and Giovanni Millo – juljo Sep 21 '20 at 11:49
  • There is no argument `Robust` to function `pgmm`. There is argument `robust` (note the non-capitalization of the letter `r`) to the `summary`method for pgmm objects. – Helix123 Mar 13 '21 at 22:46

1 Answers1

0

Unfortunately the example with the Airline data throws an error which seems to be related to too many instruments in your GMM formula. If you are using different data which does not exhibit this problem you can use robust standard errors by using the vcovHC option in mtest. In your example the last call could then be:

mtest(reg.gmm, order = 2, vcov = vcovHC)
juljo
  • 634
  • 2
  • 14