solveGel-methods: ~~ Methods for Function 'solveGel' in Package 'gmm4' ~~

Description Usage Arguments Value Methods Examples

Description

~~ Methods for function solveGel in package gmm4 ~~

Usage

1
2
3
4
5
## S4 method for signature 'gelModels'
solveGel(object, theta0=NULL, lambda0=NULL,
                               lamSlv=NULL,
                               coefSlv=c("optim","nlminb","constrOptim"),
                               lControl=list(), tControl=list())

Arguments

object

An object of class "gelModels"

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 "linearGel" objects do not have a theta0 slot.

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 Wu_lam, EEL_lam, REEL_lam or getLambda is used.

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.

Value

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 optim, constrOptim or nlminb

Methods

signature(object = "gelModels")

The method applies to all GEL classes.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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)))

gmm4 documentation built on Dec. 6, 2019, 3:01 a.m.