solveGel-methods {gmm4} | R Documentation |
solveGel
in Package gmm4 ~~~~ Methods for function solveGel
in package gmm4 ~~
## S4 method for signature 'gelModels' solveGel(object, theta0=NULL, lambda0=NULL, lamSlv=NULL, coefSlv=c("optim","nlminb","constrOptim"), lControl=list(), tControl=list())
object |
An object of class |
theta0 |
The vector of coefficients for the starting values used
in minimization algorithm. If NULL, the starting values in the object is
used. For linear models, it must be provided because
|
lambda0 |
The q \times 1 vector of starting values for the Lagrange multipliers. By default a zero vector is used. |
lamSlv |
An alternative solver for the Lagrange multiplier. By
default, either |
coefSlv |
Minimization solver for the coefficient vector. |
lControl |
A list of controls for the Lagrange multiplier algorithm. |
tControl |
A list of controls for the coefficient algorithm. |
A list with the following:
theta |
The vector of solution |
lambda |
The vector of Lagrange multiplier |
lconvergence |
convergence code for the Lagrange multiplier. 0 means normal convergence. |
convergence |
convergence code for the coefficients. 0 means
normal convergence. For higher numbers, see |
signature(object = "gelModels")
The method applies to all GEL classes.
data(simData) model1 <- gelModel(y~x1, ~z1+z2, gelType="EL", data=simData) ## Get a good starting value theta0 <- modelFit(as(model1, "gmmModels"))@theta #Some NA's are produced res <- solveGel(model1, theta0=theta0) ## Wu's method is pretty stable res2 <- solveGel(model1, theta0=theta0, lControl=list(algo="Wu")) ## Change solver parameters res3 <- solveGel(model1, theta0=theta0, lControl=list(algo="Wu"), tControl=list(method="Nelder", control=list(maxit=2000)))