[R] 'gmm' package: How to pass controls to a numerical solver used in the gmm() function?

Malikov, Emir emalikov at binghamton.edu
Wed Feb 20 02:25:21 CET 2013

Hello --

The question I have is about the gmm() function from the 'gmm' package
(v. 1.4-5).

The manual accompanying the package says that the gmm() function is
programmed to use either of four numerical solvers -- optim, optimize,
constrOptim, or nlminb -- for the minimization of the GMM objective

I wonder whether there is a way to pass controls to a solver used
while calling the gmm() function?

In particular, the problem that I have been having is that the gmm()
fails to converge withing the default number of iteration for the
'optim' solver that it uses. Ideally, I would wish to figure out a way
to be able to choose controls, including the number of iterations, for
the solver that I tell gmm() to use.

Currently, the way I call the function is as follows:

model.name <- gmm(g=g.fn, x=data, gradv=g.gr, t0=c(start),
type=c("twostep"), optfct=c("optim") )

I also would want the gmm() function to know that I want it to pass
the following control -- maxit=1500 -- to the optim solver.
Unfortunately, the 'gmm' manual does not tell whether this is doable.

Thanks for your help.

More information about the R-help mailing list