by SeamusX
Last Updated August 07, 2017 09:19 AM

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:

- Not all columns of the
`x`

matrix 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. - The numerical derivatives for the gradient matrix failed. I'm trying to avoid providing a direct gradient matrix because of the large number of parameters.
- The GMM package is not compatible with numerical integration within the moment conditions.

If anyone has some insight on this it would be greatly appreciated.

- ServerfaultXchanger
- SuperuserXchanger
- UbuntuXchanger
- WebappsXchanger
- WebmastersXchanger
- ProgrammersXchanger
- DbaXchanger
- DrupalXchanger
- WordpressXchanger
- MagentoXchanger
- JoomlaXchanger
- AndroidXchanger
- AppleXchanger
- GameXchanger
- GamingXchanger
- BlenderXchanger
- UxXchanger
- CookingXchanger
- PhotoXchanger
- StatsXchanger
- MathXchanger
- DiyXchanger
- GisXchanger
- TexXchanger
- MetaXchanger
- ElectronicsXchanger
- StackoverflowXchanger
- BitcoinXchanger
- EthereumXcanger