evalGel-methods {momentfit}R Documentation

~~ Methods for Function evalGel in Package modelfit ~~

Description

Method to simply evaluate a GEL model at a fixed coefficient vector. It creates a "gelfit" object using that fixed vector.

Usage


## S4 method for signature 'momentModel'
evalGel(model, theta, lambda=NULL,
                                gelType="EL", rhoFct=NULL,
                                lamSlv=NULL, lControl=list(), ...)

Arguments

model

An object of class "momentModel".

theta

A vector of coefficients at which the model is estimated

lambda

The Lagrange multiplier vector. If not provided, the optimal vector is obtained for the given theta

gelType

The type of GEL. It is either "EL", "ET", "EEL", "HD", "ETEL" or "ETHD".

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 rhoFct.

lamSlv

An alternative solver for the Lagrange multiplier. By default, either Wu_lam, EEL_lam, REEL_lam or getLambda is used.

lControl

A list of controls for the Lagrange multiplier algorithm.

...

Other arguments to pass. Not used for the moment.

Methods

signature(model = "momentModel")

Examples

data(simData)
theta <- c(beta0=1,beta1=2)

## A linear model with optimal lambda
model1 <- momentModel(y~x1, ~z1+z2, data=simData)
evalGel(model1, c(1,1))

## A nonlinear model with fixed lambda
g <- y~beta0+x1^beta1
h <- ~z1+z2
model2 <- momentModel(g, h, c(beta0=1, beta1=2), data=simData)
evalGel(model2, theta=c(beta1=2, beta0=0.5), lambda=c(.1,.2,.3), gelType="ET")


[Package momentfit version 0.5 Index]