It computes the vector of Lagrange multipliers, which maximizes the GEL objective function, using an iterative Newton method.
1 2 
gt 
A n \times q matrix with typical element g_i(θ,x_t) 
l0 
Vector of starting values for lambda 
type 
"EL" for empirical likelihood, "ET" for exponential tilting and "CUE" for continuous updated estimator. See details for "ETEL". 
tol_lam 
Tolerance for λ between two iterations. The algorithm stops when \λ_i λ_{i1}\ reaches 
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 nonconvergence message if \max(gradiant) does not reach 
k 
It represents the ratio k1/k2, where k1=\int_{∞}^{∞} k(s)ds and k2=\int_{∞}^{∞} k(s)^2 ds. See Smith(2004). 
method 
The iterative procedure uses a Newton method for solving the FOC. It i however recommended to use 
control 
Controls to send to 
It solves the problem \max_{λ} \frac{1}{n}∑_{t=1}^n ρ(gt'λ). For the type "ETEL", it is only used by gel
. In that case λ is obtained by maximizing \frac{1}{n}∑_{t=1}^n ρ(gt'λ), using ρ(v)=\exp{v} (so ET) and θ by minimizing the same equation but with ρ(v)\log{(1v)}. To avoid NA's, constrOptim
is used with the restriction λ'g_t < 1.
lambda: A q\times 1 vector of Lagrange multipliers which solve the system of equations given above.
conv
: Details on the type of convergence.
Newey, W.K. and Smith, R.J. (2004), Higher Order Properties of GMM and Generalized Empirical Likelihood Estimators. Econometrica, 72, 219255.
Smith, R.J. (2004), GEL Criteria for Moment Condition Models. Working paper, CEMMAP.
1 2 3 4 5 6 7 8 9 10 11 12 13 14  g < function(tet,x)
{
n < nrow(x)
u < (x[7:n]  tet[1]  tet[2]*x[6:(n1)]  tet[3]*x[5:(n2)])
f < cbind(u, u*x[4:(n3)], u*x[3:(n4)], u*x[2:(n5)], u*x[1:(n6)])
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)
gt < g(c(0,phi),x)
getLamb(gt, type = "EL",method="optim")

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.