NEWS
gmm 1.6-2 (2018-03-15)
- Fixed a bug with iterative GMM from the previous version
- Added the option onlyCoefficients=FALSE to gmm() and gel(). If set to TRUE, no covariance matrix is computed. Only the coefficients
objective and the lambdas (for gel only) are returned.
- In previous versions, the HAC weighting matrix for linear models was computed without specifying that the first column of the
instrument matrix was a column of ones (with its name being "(Intercept)"). It makes a difference when computing the bandwidth with
bwNeweyWest. The new version, takes it into account. It is not possible to obtain the same sandwich covariance matrix with gmm and OLS.
- In previous versions, the weighting matrix and, as a result, the standard errors were based on the small sample adjusted vcovHAC for weakly dependent
processes. The adjustment is not justified for GMM. The option adjust=FALSE is therefore added to vcovHAC in .myKernHAC()
- Added a method getImpProb, which extract the implied probabilities. It allows for negative probabilities as it often happens with CUE
- lambda for CUE is solved analytically (it is minus the projection of gt on a vector of ones). The option RCue for optlam can be used to restrict the implied probabilities to be non-negative.
gmm 1.6-1 (2017-06-14)
- Added the function bwWilhelm() to compute the optimal bandwidth of Wilhelm(2015).
- The argument $vcov of tsls object is the Classical covariance matrix. vcov() must be used to obtain a different covariance
- Changed the default value of prewhite to 1 in gmm() because it is recommended for HAC estimation
- gmm with optfct="optimize" was generating an error message. It has been fixed
- A new set of functions to estimate the average treatment effect by GEL have been added. See ?ATEgel
- Some other minor bugs that were reported by users were fixed.
gmm 1.6-0
- tsls is now a real 2-stage least square. Before it was a 2-step optimal GMM with HCCM weighting matrix.
- Fixed a typo in FinRes.R file. It was preventing to compute the proper vcov matrix for a very special case (fixed weights)
- Added Helinger distance and Exponentially tilted Helinger estimator to gel()
- Fixed the LR test of ETEL in gel()
- Cleaned a lot of the codes. In particular, a single moment function and its gradiant function is used now.
There is also a common weighting matrix generator function. The main goal is to make it more flexible and give the possibility
of creating weighting matrix based on other assumption such as clustering.
- For GEL with smooth=TRUE, the weights were not fixed which was creating problems of convergence.
- Add the option of fixing the value of some coefficient in gel as it as already the case for gmmm.
- It is no possible to provide gmm with the gradiant function when constrOptim is used.
- There is now an evalGmm() function to create a gmm object with a given fixed vector. Not estimation is done, but the bandwidth and weights
for the HAC estimator are generated. It is possible to give a different vector os parameters for the moment function and the weighting matrix.
- There is also an evalGel(). You fix the parameters and only the lambda are computed.
- Fixed NAMESPACE to avoid the notes given by CRAN.
- Modified getDat to allow for ~1 as instruments. Useful for inference on the mean using empirical likelihood with gel(x~1,~1).
- The Lambdas and specTest from gel are printed even if the model is just identified. It is consitent with gmm which prints the j-test
for just identified models. The reason if to allow evalGel to generate the Lamdbas for testing purpose.
- confint.gxx() has been modified. It now create an object and a print method has been created as well.
- confint.gel includes the possibility of building a confidence interval using the inversion of one of the three specification tests.
It is therefore possible de construct an Empirical Likelihood confidence interval as described in Owen 2001. See manual.
- On the process to create a sysGmm for system og linear equations. The function sysGmm() will do the job. Not yet working.
- getDat is modified so that the name of the dependent variable is the one included in the formula.
- A set of functions have been added to estimate system of linear equations (this is a beta version not tested yet).
- A set of labor data as been added to test the sysGmm function
- A panel of Macro data has been added.
gmm 1.5-2 (2015-03-17)
- Added constrOptim to nonlinear gmm() with fixed W
gmm 1.5-1 (2015-02-09)
- Added importFrom element
- Added element df.residual to gmm objects to allow F-type linearHypothesis
- Removed the unnecessary ls estimations in the first stage 2SLS
gmm 1.5-0 (2013-12-11)
- Thanks to Eric Zivot. Many improvements are based on his testings of the package.
- Fixed many bugs for the case in which vcov is set to iid
- Added options to tsls(). There are options for different sandwich matrix when summary is called
gmm 1.4-6
- Added the possibility of providing data.frame() with formula to gel()
gmm 1.4-5 (2013-01-11)
- Replaced the deprecated function real(), is.real() and as.real() by double()
gmm 1.4-4 (2012-11-22)
- Fixed an instability problem when the model is just identified and wmatrix is set to "ident"
gmm 1.4-3 (2012-09-23)
- Added the option "constrOptim" to optfct for nonlinear models
- Added the option "eqConstFullVcov" to gmm() to allow the computation the covariance matrix of all coefficients including
the constrained ones (see ?gmm for details and examples).
- Removed the dependency on fBasics and replaced it with stabledist
gmm 1.4-2 (2012-06-19)
- Bugs fixed when running gel() with smooth=T and g() begina nonlinear function
- Now, print.gel() and print.summary.gel() repports the bandwidth when smooth=T
gmm 1.4-0 (2012-05-25)
- The method for GMM-CUE has been modified. Before, the weights for the kernel estimation of the weighting matrix
were flexible inside the optimizer which was making the algorithm long and unstable. It is now fixed using either the starting
values provided by the user (for linear cases) or the first step GMM.
- You can now trace the convergence of the iterative GMM with the option traceIter=T
- The weights for the kernel are also fixed for iter-GMM. It is faster and I don't think it should change at each iteration. I am open to comments on that.
- A function tsls() has been added to facilitate the estimation by 2SLS. The user does not have to worry about selecting the right gmm options
- summary and print Methods have been added for tsls objects. The summary prints the f-statistics of the first stage LS
- SmoothG for GEL uses now the kernapply() function which is more efficient.
- Something the GMM converge to weird values which is sometimes caused by bad first step estimates used to compute the weighting matrix.
Summary() prints the initial values to have more infortmation when convergence fails.
- There was a bug in specTest() for GEL. The degrees of freedom for the J-test were wrong. It is fixed.
- For GEL type CUE the implied probabilities are computed according to Antoine, Bonnal, and Renault (2007) which solves the
problem of negative probabilities.
- The data file Finance has been resaved which implies that the package depends now on R version 2.10.0 and higher
- The function rho() had been changed to .rho() because it is not useful outside the gel() function
- The function getLamb() has been modified. It is now more efficient. The default for the gel() option optlam is now nlminb.
The gradient and the hessian is provided which makes it much faster to solve for lambda. The argument of the function also changed.
Instead of providing the function g() and the vector of coefficients, we provide the matrix gt. I may be useful to call the function
sometimes to solve for lambda and it is easier that way.
- The choice "iter" from the option optlam is kept for cases in which the optimizer fails to solve for lambda. It is often the case
when type="ETEL" is chosen which tends to produce NA's.
- For GEL of type "EL" and optfct="optim", the algorith constrOptim() is launched to make sure lambda'gt is always greater than 1
and avoid NA's when computing log(1-lambda'gt). The algorithm checks first with optim(), and swith to constrOptim() is optim() fails
- Sometimes, problems happen in GMM estimation because of the bad first step estimates used to compute the weighting matrix.
The first step estimates are usually computed using the identity matrix. The vector is now printed for better control.
- Cleaned the codes. The data are in object$dat and we can get the moment matrix by calling gt <- object$g(object$coef,object$dat) for linear and
non-linear models, where object is of class gmm.
- We can now impose equality constraints of the type theta_i=c_i with the option eqConst=. See help(gmm) which includes examples.
- The K statistics for weakly identified models of Kleiberben (2005) has been added. See ?KTest.
- (gmm only) The bandwidth for the HAC estimation is set by the first step estimate. Its value, along with the weights,
is saved in attr(obj$w0,"Spec"). If the user is not satisfied with this automatic bw selection, bw can be set to any fixed number when
calling gmm(). See ?gmm for more details and examples.
- The function gmmWithConst() reestimate an unrestricted model by imposing linear constraints, using the same specification.
It also use the same bandwidth for the estimation of the HAC matrix
- A regularized version of GEL based on Chausse(2011) is now implemented. The Lagrange multiplier can be regularized by setting the option
"alpha=" to a number. The regularization can stabilize the GEL estimator. A preliminary paper will be available on my web site that analyze
the properties of such modification. A method for selecting alpha will be implemented in future version.
gmm 1.3-8 (2011-07-28)
- A bug was found in the computation of linear GMM. The weighting matrix was not use properly. It is now fixed.
gmm 1.3-7
- Until now there was no way to know whether optim or nlminb has converged in case of nonlinear GMM. The convergence code
is now printed by print.gmm and the message and function evaluation by print.summary.gmm
- For cases in which the weighting matrix is provided, you have the choice of assuming that it is just a fixed matrix
not necessary equal to the inverse of the covariance matrix of the moment conditions (the default) or setting
vcov="TrueFixed" if it is the inverse of the estimated covariance matrix.
- If gradv is provided, it is not only used to compute the covariance matrix. It is also used to compute the
gradiant of the objective function when the method is set to "CG" or "BFGS" in optim. For CUE, it is only used for the
first step estimate because the gradiant can hardly be obtained analytically in that case.
gmm 1.3-6 (2011-04-07)
- Bug fixed when estimating model with timeSeries objects
- When NA were present in the data and the instruments, gmm() was not working when omitting them created different dimension.
If by chance it created the same dimensions, the data were not correctly aligned. Now it is aligned and the observations
associated with the NA's are removed. When it happens, a warning message is displayed.
gmm 1.3-5 (2011-03-27)
- Bug fixed when estimating linear model with Z=X (OLS with robust matrix)
gmm 1.3-4
- It is now possible to enter the instruments in x either as a matrix
(like before) or as a formula. See details and examples in gmm help
- A data argument is added to the gmm function. Therefore, it is no longer required
that the variables in data.frames be attached before using gmm(). You just need to add the option data=your_data.frame.
- 2SLS is now implemented in a more efficient way for linear models. Just add the option vcov="iid". An example as been included for that case
gmm 1.3-3 (2010-09-26)
- It is a very small modification to avoid errors in the installation. The function linear.hypothesis of the car package is now deprecated. They have be changed to linearHypothesis.
gmm 1.3-2 (2010-05-25)
- The functions HAC, weightsAndrews2, bwAndrews2 and all the others to compute the HAC matrix have been removed. The sandwich package is
now used to compute these matrices.
- The option centeredVcov has beed added to the gmm function. It allows to compute the covariance matrix using a centered moment function.
- The option weightsMatrix has beed added to the gmm function. It allows to fixe the matrix of weights.
- The methods bread() and estfun() are now available for gmm objects. It allows to compute a sandwich covariance matrix which
is required if the weighting matrix is not the optimal one.
- The results are obtained even if the covariance matrix cannot be computed
- The vignette has been updated.
gmm 1.3-0 (2010-01-10)
- The method "getModel", "momentEstim" is now used also for the gel procedure.
- The GEL procedure as been modified. For the case in which the option smooth=TRUE is used,
the appropriate scaling parameters have been added following Smith(2004) in the estimation, the covariance matrix of the Lagrange
multiplier and the tests of over-identifying restrictions. In this case, only the kernels Truncated and Bartlett are available.
For the former, the optimal bandwidth of Andrews(91) for Bartlett is used and for the latter, it is the bandwidth proposed
for the Parzen. See Smith(2004) for more details. Also, the option vcov as been removed since it is irrelevant for GEL. By setting smooth to
FALSE, it is implied that the data are iid.
gmm 1.2-0
- The new method specTest computes the specification tests from objects created by "gmm" or "gel"
- The structure of the package has been modified in order to make it more flexible. The changes include:
- The new method "getModel" prepares the estimation. It creates what is required by the method "momentEstim".
- The method "momentEstim" estimates the model defined by "getModel"
- The method "FinRes" finalizes the estimation when it is needed. For now, the method is used only by "gmm" to compute the final resutls.
- Some bugs are fixed
- The Vignette has been modified a little and the errors in the manual corrected.
gmm 1.1-0 (2009-08-27)
- The name of the vector of parameters is now "coefficients" instead of "par"
- The following methods are now available (see lm): fitted, residuals, vcov, coef, confint
- There are now print methods for gmm, gel and summary.gel and summary.gmm
- These modifications allows to use linear.hypothesis from the car package so the function lintest is no longer needed and as been removed
- The following are now available from gmm and gel objects when g is a formula: residuals, fitted.values, model.frame, terms, model, the response and model matrix
- Because the presence of the confint method, the option "interval" as been removed from the summary methods
- A new plot method is available for both gmm and gel objects. It is a beta version. Comments and suggestions are welcome.
- If there is only one instrument it can be provided as a vector. It does not need to be a matrix anymore.
- It is now possible to select nlminb as optimizer. It allows to put restriction on the parameter space.
- The package no longer depends on mvtnorm. It is a suggested package as it is only required for examples.
- The packages car and fBasics (and therefore MASS, timeDate and timeSeries) are now suggested for examples in the vignette.
- The new function charStable has been added. It computes the characteristic function of a stable distribution. An example is shown in the vignette
- There was a bug when trying to estimate a model by ETEL with gel and numerical computation of lambda. It is fixed. Thanks to Márcio Laurini.
- The vignette as beed rewritten.
gmm 1.0-7 (2009-07-02)
- Modified some functions to remove dependencies on tseries and sandwich packages
- Convert de Finance Data to data frame format
gmm 1.0-6 (2009-05-12)
- Some bugs fixed. Thanks to Justinas Brazys
gmm 1.0-4 (2009-03-10)
- documentation enhancements
- Added finance data for applied examples
gmm 1.0-3 (2009-03-07)
gmm 1.0-2 (2009-03-05)
- Added a new example for better understanding.