GMM

Options     Examples     References

GMM does General Methods of Moments estimation on a set of orthogonality conditions which are the products of equations and instruments. Initial conditions for estimation are obtained using three-stage least squares. The instrument list may be different for each equation (see the MASK option or the INST option) and the form of the covariance matrix used for weighting the estimator is under user control (the HETERO option for heteroskedastic-consistency and the NMA= option for moving average disturbances).

GMM(HETERO, ITEROC, ITERU, LSQSTART,

           COVOC=OWN or <covariance matrix of orthogonality conditions>,

           COVU=<covariance matrix of residuals>, INST=(<list of instruments>),

           KERNEL=<spectral density kernel type>, MASK=<matrix of zeros and ones>,

           NMA=<number of autocorrelation terms>, OPTCOV, nonlinear options)

           list of equations;

Usage

List the instruments in the INST= option and list the equations after the options; the products of these two are the orthogonality conditions, which are minimized in the metric of an estimate of their expected covariance. This estimate is computed using 3SLS estimates of the parameters, unless the NOLSQSTART option has been specified. If the HETERO and NMA= options are not used, the estimation method coincides with conventional 3SLS estimation. The usual GMM estimator that allows for heteroskedasticity in addition to cross-equation correlation is the default. If you wish to use different instruments for each equation, supply each set in a series of separate lists separated by |  to the INST= option (see the examples). Alternatively you can use the MASK= option to drop instruments selectively.  

The GMM estimator prints the Sargan or J of overidentifying restrictions if the degrees of freedom are greater than zero (the model is exactly identified if they are equal to zero). If you want to nest overidentifying tests of a series of models, be sure to specify the NOLSQSTART option so that the variance-covariance matrix of the OC's will be held fixed across the tests (otherwise the chi-squared for the difference between two nested models may have the wrong sign).

Method

See Hansen (1982) for most of the details. If the equations are nonlinear, the iteration method is the usual LSQ method with analytical derivatives (a variant of the method of scoring).

Output

The following results are stored:

variable

type

length

description

@PHI

scalar

1

E'HH'E, the objective function for instrumental variable estimation.

@GMMOVID

scalar

1

test of overidentifying restrictions (@PHI*@NOB)

%GMMOVID

scalar

1

P-value of the above test (using degrees of freedom)

@NOVID

scalar

1

number of overidentifying restrictions (degrees of freedom)

@RNMS

list

#params

Parameter names.

@COEF

vector

#params

Estimated values of parameters,also stored under their names.

@SES

vector

#params

Standard Errors of estimated parameters.

@T

vector

#params

T-statistics.

@SSR

vector

#eqs

Vector of sum of the squared residuals for each of the equations

@YMEAN

vector

#eqs

Vector of means of the dependent variable for each of the equations

@SDEV

vector

#eqs

Vector of standard deviations of the dependent variable for each of the equations

@S

vector

#eqs

Vector of standard errors for each of the equations

@DW

vector

#eqs

Vector of Durbin-Watson statistics for each of the equations

@RSQ

vector

#eqs

Vector of R-squared for each of the equations

@ARSQ

vector

#eqs

Vector of adjusted R-squared for each of the equations

@OC

vector

#eqs*#inst

Estimated orthogonality conditions

@COVOC

matrix

#eqs*#inst by #eqs*#inst

Estimated covariance of orthogonality conditions

@COVU

matrix

#eqs*#eqs

Residual covariance matrix

@W

matrix

#eqs*#eqs

Inverse square root of @COVU, the upper triangular weighting matrix

@COVT

matrix

#eqs*#eqs

Covariance matrix of the transformed residuals. This is equal to the number of observations times the identity matrix if estimation is by ML

@VCOV

matrix

#par*#par

Estimated variance-covariance of estimated parameters

@RES

matrix

#obs*#eqs

Matrix of residuals=actual - fitted values of the dependent variable

@FIT

matrix

#obs*#eqs

Matrix of fitted values of the dependent variables

Options

COVOC= covariance matrix of the orthogonality conditions. The default is to compute starting values with 3SLS and form the covariance matrix from these.

COVOC=OWN computes residuals from the current starting values and forms the covariance matrix from these.

COVU= covariance matrix of residuals. This is used for the initial 3SLS estimates if the default LSQSTART option is in effect. The default is the identity matrix. This option is the same as the old WNAME= option in LSQ.

HETERO/NOHETERO specifies conditional heteroskedasticity of the residuals, and causes the COVOC matrix to include interaction terms of the residuals and the derivatives with respect to the parameters. Specify this option to obtain the usual Hansen or Chamberlain estimator. When HETERO is on, GMM checks that the number of OC's is less that the number of observations so that COVOC will be positive definite (if not, an error message is printed).

INST= (<list of instrumental variables>), assumed to be orthogonal to the residuals of the supplied equations by assumption. In some models these variables are referred to as the "information set." Don't forget to include C, the constant, unless your model does not require one.

INST= (list1 | list2 | ....) specifies a list of different instruments for each equation. There must be as many lists as there are equations.

ITEROC/NOITEROC causes iteration on the COVOC matrix. Normally it is left fixed at its initial estimate. If MASK and LSQSTART are used, one iteration is made on the COVOC matrix. This also occurs if NOLSQSTART is used and COVOC= is not specified.

ITERU/NOITERU causes iteration on the COVU matrix. This is the same as the old MAXITW= option in LSQ.

KERNEL=BARTLETT or PARZEN. The spectral density kernel used to insure positive definiteness of the COVOC matrix when NMA > 0. BARTLETT is discussed by Newey and West (1987), while PARZEN is discussed by Gallant (1987). Both are reviewed by Andrews (1991).

LSQSTART/NOLSQSTART specifies if 3SLS should be used to obtain starting values for the parameters and COVOC. NOLSQSTART should be specified if you are restarting iterations with old parameter values and a COVOC matrix. This will be important for testing (see the discussion above).

MASK= a matrix of zeroes and ones which specifies which instruments are to be used for which equations. The matrix is # of instruments by # of equations and the default is a matrix of ones (all instruments used for all equations).

NMA= number of autocorrelation terms (AR and/or MA) to be used in computing COVOC. Some forecasting-type models imply a given NMA value, but other models have no natural choice. See the Andrews reference for automatic bandwidth selection procedures. When there are missing values in the series, NMA does not include terms which cross the gaps in the data. This is useful in panel data estimation.

OPTCOV/NOOPTCOV specifies whether or not the COVOC matrix is optimal. Under the default NOOPTCOV, the @VCOV matrix is computed using the "sandwich" formula of Hansen's 1982 Theorem 3.1 (p.1042). This is appropriate, for example, if the user has supplied a COVOC matrix, but has not scaled it properly. Note: in this (improperly scaled COVOC) case, the @GMMOVID statistic will be invalid. When OPTCOV is in effect, formula (10) of Hansen's Theorem 3.2 (p.1048) is used for the @VCOV matrix. When the user has not supplied a COVOC matrix, the OPTCOV and NOOPTCOV options produce almost exactly the same results. The only difference is due to the difference between the COVOC matrix that was used for iterations, and the COVOC matrix evaluated at the final parameter/residual values. This difference is usually small.

Examples

GMM (INST=(C,Z1-Z10),NMA=2,HET) EQ1 EQ2;

To exclude Z2 as instrument for EQ1, Z1 as instrument for EQ2:

READ(NROW=3,NCOL=2) SEL;

      1 1

      1 0

      0 1 ;

? C,Z1 enter EQ1 and C,Z2 enter EQ2

GMM (INST=(C,Z1,Z2),MASK=SEL) EQ1 EQ2;

The same thing can be done using a different list for each equation:

LIST INST1 C Z1 ;

LIST INST2 C Z2 ;

GMM (INST=(INST1|INST2)) EQ1 EQ2 ;

The second version uses less data storage, which does not matter for this short example, but may be important if you have many equations.

References

Andrews, Donald W. K., “Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimation,” Econometrica 59 (3), 1991, pp. 817-858.

Arellano, M. and S. Bond, "Some Tests of Specification for Panel Data: Monte Carlo Evidence and An Application to Employment Equations," Review of Economic Studies 58 (1991), pp. 277-297.

Chamberlain, Gary. 1982. "Multivariate Regression Models for Panel Data." Journal of Econometrics 18: 5-45.

Gallant, A. Ronald, Nonlinear Statistical Models, Wiley, 1987.

Hansen, Lars Peter, "Large Sample Properties of Generalized Method of Moments Estimation," Econometrica 50, July 1982, pp. 1029-1054.

Hansen, Lars Peter, and Singleton, Kenneth J., "Generalized Instrumental Variables Estimation of Nonlinear Rational Expectations Models," Econometrica 50, September 1982, pp. 1269-1286.

Newey, Whitney K., and West, Kenneth D., "A Simple Positive Semi-Definite Heteroskedasticity and Autocorrelation Consistent Covariance Matrix," Econometrica 55, May 1987, pp. 703-708.