Description Usage Arguments Value References See Also Examples
The main functions and methods to fit any model with GMM. As opposed to
modelFit
, models don't need to be created. It is all done by
the functions. It is meant to be more user friendly. This document
needs to changed. It is just a copy and paste from the gmm package
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | gmm4(g, x, theta0 = NULL, grad = NULL,
type = c("twostep", "iter", "cue", "onestep"),
vcov = c("iid", "HAC", "MDS", "TrueFixed", "CL"),
initW = c("ident", "tsls", "EbyE"), weights = "optimal",
itermaxit = 50, cstLHS=NULL, cstRHS=NULL,
vcovOptions=list(), survOptions=list(),
itertol = 1e-07, centeredVcov = TRUE,
data = parent.frame(), ...)
## S4 method for signature 'formula'
tsls(model, x, vcov = c("iid", "HAC", "MDS", "CL"),
vcovOptions=list(), survOptions=list(), centeredVcov = TRUE,
data = parent.frame())
## S4 method for signature 'list'
tsls(model, x=NULL, vcov = c("iid", "HAC", "MDS",
"CL"), vcovOptions=list(), survOptions=list(),
centeredVcov = TRUE, data = parent.frame())
## S4 method for signature 'list'
ThreeSLS(model, x=NULL, vcov = c("iid", "HAC", "MDS",
"CL"), vcovOptions=list(), survOptions=list(),
centeredVcov = TRUE, data = parent.frame())
|
model |
A formula or a list of formulas. |
g |
A function of the form g(θ,x) and which returns a n \times q matrix with typical element g_i(θ,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 or nonlinear, or a list of formulas for systems of equations. |
x |
The matrix or vector of data from which the function g(θ,x) is computed. If "g" is a formula, it is an n \times Nh matrix of instruments or a formula (see details below). |
theta0 |
A k \times 1 vector of starting values. It is required only when "g" is a function or a nonlinear equation defined by a formula, in which case, it must be a named vector |
grad |
A function of the form G(θ,x) which returns a
q\times k matrix of derivatives of \bar{g}(θ) with
respect to θ. By default, the numerical algorithm
|
type |
What GMM methods should we use? for
|
vcov |
Assumption on the properties of the random vector x. By
default, x is a weakly dependant process. The "iid" option will avoid
using the HAC matrix which will accelerate the estimation if one is
ready to make that assumption. The option "TrueFixed" is used only
when the matrix of weights is provided and it is the optimal one. For
type |
initW |
How should be compute the initial coefficient vector in the first. It only makes a difference for linear models for which the choice is GMM with identity matrix or two-stage least quares. |
weights |
What weighting matrix to use? The
choices are |
itermaxit |
Maximum iterations for iterative GMM |
itertol |
Tolance for the stopping rule in iterative GMM |
centeredVcov |
Should the moment function be centered when computing its covariance matrix. Doing so may improve inference. |
data |
A data.frame or a matrix with column names (Optional). |
cstLHS |
The left hand side of the constraints to impose on the
coefficients. See |
cstRHS |
The right hand side of the constraints to impose on the
coefficients. See |
vcovOptions |
A list of options for the covariance matrix of the
moment conditions. See |
survOptions |
If needed, a list with the type of survey weights and
the weights as a numeric vector, data.frame or formula. The type is either
|
... |
Arguments to pass to |
It returns an object of class "gmmfit"
Zeileis A (2006), Object-oriented Computation of Sandwich Estimators. Journal of Statistical Software, 16(9), 1–16. URL http://www.jstatsoft.org/v16/i09/.
Andrews DWK (1991), Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimation. Econometrica, 59, 817–858.
Newey WK & West KD (1987), A Simple, Positive Semi-Definite, Heteroskedasticity and Autocorrelation Consistent Covariance Matrix. Econometrica, 55, 703–708.
Newey WK & West KD (1994), Automatic Lag Selection in Covariance Matrix Estimation. Review of Economic Studies, 61, 631-653.
Hansen, L.P. (1982), Large Sample Properties of Generalized Method of Moments Estimators. Econometrica, 50, 1029-1054,
Hansen, L.P. and Heaton, J. and Yaron, A.(1996), Finite-Sample Properties of Some Alternative GMM Estimators. Journal of Business and Economic Statistics, 14 262-280.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.