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!
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)