The main functions and methods to fit any model with GEL. As opposed to
gelFit
, models don't need to be created. It is all done by
the functions. It is meant to be more user friendly.
gel4(g, x=NULL, theta0=NULL,lambda0=NULL, getVcov=FALSE,
gelType = c("EL","ET","EEL","HD", "REEL","ETEL","ETHD"),
vcov = c("MDS","iid","HAC"), grad=NULL,
vcovOptions=list(), centeredVcov = TRUE,
cstLHS=NULL, cstRHS=NULL, lamSlv=NULL,
rhoFct=NULL, initTheta=c("gmm", "theta0"),
data = parent.frame(),
coefSlv=c("optim","nlminb","constrOptim"),
smooth=FALSE,
lControl=list(), tControl=list())
It returns an object of class "gelfit"
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. It can also be a formula if the model is linear (see detailsbelow).
The matrix or vector of data from which the function \(g(\theta,x)\) is computed. If "g" is a formula, it is an \(n \times Nh\) matrix of instruments or a formula (see details below).
A \(k \times 1\) vector of starting values. It is required
only when "g" is a function, a formula or a list of formulas. For
these cases, they are needed to create the "momentModel"
object.
The \(q \times 1\) vector of starting values for the Lagrange multipliers. By default a zero vector is used.
Should the method computes the covariance matrices of the coefficients and Lagrange multipliers.
A character string specifying the type of GEL.
Assumption on the properties of the moment conditions.
A function of the form \(G(\theta,x)\) which returns a \(q\times k\) matrix of derivatives of \(\bar{g}(\theta)\) with respect to \(\theta\).
A list of options for the covariance matrix of the
moment conditions. See vcovHAC
for the default values.
Should the moment function be centered when computing its covariance matrix. Doing so may improve inference.
The left hand side of the constraints to impose on the
coefficients. See restModel
for more details.
The right hand side of the constraints to impose on the
coefficients. See restModel
for more details.
An alternative solver for the Lagrange multiplier. By
default, either Wu_lam
, EEL_lam
,
REEL_lam
or getLambda
is
used. See the vignette for the required format.
An optional function that return \(\rho(v)\). This is
for users who want a GEL model that is not built in the package. The
four arguments of the function must be "gmat"
, the matrix of
moments, "lambda"
, the vector of Lagrange multipliers,
"derive"
, which specify the order of derivative to return, and
k
a numeric scale factor required for time series and kernel
smoothed moments.
Method to obtain the starting values for the
coefficient vector. By default the GMM estimate with identity matrix
is used. The second argument means that "theta0"
is used
instead.
A required data.frame, in which all variables in g and x can be found.
If TRUE, "vcov"
is set to "MDS"
and the
moment conditions are smoothed using a kernel. See the vignette for
more details.
Minimization solver for the coefficient vector.
A list of controls for the Lagrange multiplier algorithm.
A list of controls for the coefficient algorithm.
Anatolyev, S. (2005), GMM, GEL, Serial Correlation, and Asymptotic Bias. Econometrica, 73, 983-1002.
Andrews DWK (1991), Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimation. Econometrica, 59, 817--858.
Kitamura, Yuichi (1997), Empirical Likelihood Methods With Weakly Dependent Processes. The Annals of Statistics, 25, 2084-2102.
Kitamura, Y. and Otsu, T. and Evdokimov, K. (2013), Robustness, Infinitesimal Neighborhoods and Moment Restrictions. Econometrica, 81, 1185-1201.
Newey, W.K. and Smith, R.J. (2004), Higher Order Properties of GMM and Generalized Empirical Likelihood Estimators. Econometrica, 72, 219-255.
Smith, R.J. (2004), GEL Criteria for Moment Condition Models. Working paper, CEMMAP.
gelFit
, momentModel
data(simData)
res <- gel4(y~x1, ~z1+z2, vcov="MDS", gelType="ET", data=simData)
res
Run the code above in your browser using DataLab