| solveGel-methods | R Documentation | 
solveGel in Package momentfit ~~It fits a moment-based model using GEL methods.
## S4 method for signature 'momentModel'
solveGel(object, gelType="EL", theta0=NULL,
                                  lambda0=NULL, lamSlv=NULL,
                                  coefSlv=c("optim","nlminb","constrOptim"),
                                  rhoFct=NULL, 
                                  lControl=list(), tControl=list())
| object | An object of class  | 
| gelType | The type of GEL. It is either  | 
| 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  | 
| lamSlv | An alternative solver for the Lagrange multiplier. By
default, either  | 
| coefSlv | Minimization solver for the coefficient vector. | 
| rhoFct | An alternative objective function for GEL. This argument
is only used if we want to fit the model with a different GEL
method. see  | 
| 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 = "momentModel")The method applies to all GEL classes.
data(simData)
model1 <- momentModel(y~x1, ~z1+z2, data=simData)
## Get a good starting value
theta0 <- gmmFit(model1)@theta
## EL by default, with Wu algorithm
res2 <- solveGel(model1, theta0=theta0)
## Change solver parameters
res3 <- solveGel(model1, theta0=theta0,
                 tControl=list(method="Nelder", control=list(maxit=2000)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.