I'm estimating a GMM model using the plm
library. I have different moment conditions.
Z <- list(~YDWPP + ST_DEGREE, ~YDWPP + ST_DEGREE, ~YDWPP + ST_DEGREE,
~YDWPP + ST_DEGREE, ~YDWPP + ST_TRANSITIVITY, ~YDWPP + ST_STRUC_HOLE,
~YDWPP + ST_STRUC_HOLE, ~YDWPP + ST_STRUC_HOLE, ~YDWPP +
ST_STRUC_HOLE)
Z <- lapply(Z, as.formula)
lg.gmm <- list(c(4L, 8L), c(5L, 8L), c(6L, 8L), 7:8, 7:8, c(4L, 8L), c(5L,
8L), c(6L, 8L), 7:8)
I am running a loop for each set of moment restrictions Z
, such that
out.1 <- list()
for(i in seq_along(Z)){
plm.gmm <-
pgmm(
dynformula(as.formula(model), lg),
data = pdata,
effect = 'twoway',
model = 'twostep',
transformation = 'd',
gmm.inst = Z[[i]],
lag.gmm = c(lg.gmm[[i]][[1]], lg.gmm[[i]][[2]])
)
sum <- summary(plm.gmm, robust = T)
print(sum)
out.1[[i]] <- sum
}
I would like to compare these models using BIC
and AIC
, for instance
AIC(plm.gmm, k=2)
Error in UseMethod("logLik") :
no applicable method for 'logLik' applied to an object of class "c('pgmm', 'panelmodel')"
Any ideas on how to compute BIC and AIC or alternative methods to choose between different moment restrictions?
I am following the answer to this question.
For further reference on the AIC criteria, you can look at Wikipedia.
Here is the code that should work. However, you didn't provide any reproducible model estimation. Hence, this is without validation for your case.