I'm running a GMM estimation with a numerical integration that contains parameters in the moment condition. The gmm() function returns the following error:
> res<-gmm(g,x,init,type="twoStep",wmatrix="ident",method="Nelder-Mead") Error in AA %*% t(X) : requires numeric/complex matrix/vector arguments In addition: Warning message: In ar.ols(x, aic = aic, order.max = order.max, na.action = na.action, : model order: 1 singularities in the computation of the projection matrix results are only valid up to model order 0
It's not clear at which point this error occurs, but it appears after a lengthy process and stops the codes, so my guess is that the program has completed the minimization problem and it occurs at some point during the covariance matrix calculation, some possibilities I can think of:
xmatrix is used. I tried to limit it to the columns used in the estimation only, but the same errors occurs. Maybe the columns are not correctly ordered.
If anyone has some insight on this it would be greatly appreciated.