data("EmplUK", package = "plm")
# Arellano/Bond 1991, Table 4, column (a1)
ab.a1 <- pgmm(log(emp) ~ lag(log(emp), 1:2) + lag(log(wage), 0:1)
+ lag(log(capital), 0:2) + lag(log(output), 0:2) | lag(log(emp), 2:99),
data = EmplUK, effect = "twoways", model = "onestep")
mtest(ab.a1, 1L)
mtest(ab.a1, 2L, vcov = vcovHC)
# Windmeijer (2005), table 2, onestep with corrected std. err
ab.b.onestep <- pgmm(log(emp) ~ lag(log(emp), 1:2) + lag(log(wage), 0:1)
+ log(capital) + lag(log(output), 0:1) | lag(log(emp), 2:99),
data = EmplUK, effect = "twoways", model = "onestep")
mtest(ab.b.onestep, 1L, vcov = vcovHC)
mtest(ab.b.onestep, 2L, vcov = vcovHC)
# Arellano/Bond 1991, Table 4, column (a2)
ab.a2 <- pgmm(log(emp) ~ lag(log(emp), 1:2) + lag(log(wage), 0:1)
+ lag(log(capital), 0:2) + lag(log(output), 0:2) | lag(log(emp), 2:99),
data = EmplUK, effect = "twoways", model = "twosteps")
mtest(ab.a2, 1L)
mtest(ab.a2, 2L) # while a la Arellano/Bond (1991) -0.434
Run the code above in your browser using DataLab