get_lamb {gmm}R Documentation

Solving for the Lagrange multipliers of Generalized Empirical Likelihood (GEL)

Description

It computes the vector of Lagrange multipliers, which maximizes the GEL objective function, using an iterative Newton method.

Usage

get_lamb(g,tet,x,type=c('EL','ET','CUE'),tol_lam=1e-12,maxiterlam=1000,tol_obj=1e-7)

Arguments

g A function of the form g(theta,x) and which returns a n times q matrix with typical element g_i(theta,x_t) for i=1,...q and t=1,...,n. This matrix is then used to build the q sample moment conditions.
tet A k times 1 vector of parameters at which the function g(theta,x) has to be evaluated
x The matrix or vector of data from which the function g(theta,x) is computed.
type "EL" for empirical likelihood, "ET" for exponential tilting and "CUE" for continuous updated estimator.
tol_lam Tolerance for λ between two iterations. The algorithm stops when |λ_i -λ_{i-1}| reaches tol_lam
maxiterlam The algorithm stops if there is no convergence after "maxiterlam" iterations.
tol_obj Tolerance for the gradiant of the objective function. The algorithm returns a non-convergence message if max(|gradiant|) does not reach tol_obj. It helps the gel algorithm to select the right space to look for theta

Details

It solves the problem frac{1}{n}sum_{t=1}^n Drho(<g(theta,x_t),λ>)g(theta,x_t)=0.

Value

lambda: A qtimes 1 vector of Lagrange multipliers which solve the system of equations given above. singular: 0 for a normal solution, 1 if the algorithm does not converge and 2 if the algorithm produces a singular system, NaN or Inf values. conv_mes: A message with details about the convergence.

References

Newey, W.K. and Smith, R.J. (2004), Higher Order Properties of GMM and Generalized Empirical Likelihood Estimators. Econometrica, 72, 219-255.

Examples

g <- function(tet,x)
        {
        n <- nrow(x)
        u <- (x[7:n] - tet[1] - tet[2]*x[6:(n-1)] - tet[3]*x[5:(n-2)])
        f <- cbind(u,u*x[4:(n-3)],u*x[3:(n-4)],u*x[2:(n-5)],u*x[1:(n-6)])
        return(f)
        }
n = 500
phi<-c(.2,.7)
thet <- 0.2
sd <- .2
x <- matrix(arima.sim(n=n,list(order=c(2,0,1),ar=phi,ma=thet,sd=sd)),ncol=1)
get_lamb(g,c(0,phi),x,type="EL")

[Package gmm version 1.0-4 Index]