
- •Preface
- •Part IV. Basic Single Equation Analysis
- •Chapter 18. Basic Regression Analysis
- •Equation Objects
- •Specifying an Equation in EViews
- •Estimating an Equation in EViews
- •Equation Output
- •Working with Equations
- •Estimation Problems
- •References
- •Chapter 19. Additional Regression Tools
- •Special Equation Expressions
- •Robust Standard Errors
- •Weighted Least Squares
- •Nonlinear Least Squares
- •Stepwise Least Squares Regression
- •References
- •Chapter 20. Instrumental Variables and GMM
- •Background
- •Two-stage Least Squares
- •Nonlinear Two-stage Least Squares
- •Limited Information Maximum Likelihood and K-Class Estimation
- •Generalized Method of Moments
- •IV Diagnostics and Tests
- •References
- •Chapter 21. Time Series Regression
- •Serial Correlation Theory
- •Testing for Serial Correlation
- •Estimating AR Models
- •ARIMA Theory
- •Estimating ARIMA Models
- •ARMA Equation Diagnostics
- •References
- •Chapter 22. Forecasting from an Equation
- •Forecasting from Equations in EViews
- •An Illustration
- •Forecast Basics
- •Forecasts with Lagged Dependent Variables
- •Forecasting with ARMA Errors
- •Forecasting from Equations with Expressions
- •Forecasting with Nonlinear and PDL Specifications
- •References
- •Chapter 23. Specification and Diagnostic Tests
- •Background
- •Coefficient Diagnostics
- •Residual Diagnostics
- •Stability Diagnostics
- •Applications
- •References
- •Part V. Advanced Single Equation Analysis
- •Chapter 24. ARCH and GARCH Estimation
- •Basic ARCH Specifications
- •Estimating ARCH Models in EViews
- •Working with ARCH Models
- •Additional ARCH Models
- •Examples
- •References
- •Chapter 25. Cointegrating Regression
- •Background
- •Estimating a Cointegrating Regression
- •Testing for Cointegration
- •Working with an Equation
- •References
- •Binary Dependent Variable Models
- •Ordered Dependent Variable Models
- •Censored Regression Models
- •Truncated Regression Models
- •Count Models
- •Technical Notes
- •References
- •Chapter 27. Generalized Linear Models
- •Overview
- •How to Estimate a GLM in EViews
- •Examples
- •Working with a GLM Equation
- •Technical Details
- •References
- •Chapter 28. Quantile Regression
- •Estimating Quantile Regression in EViews
- •Views and Procedures
- •Background
- •References
- •Chapter 29. The Log Likelihood (LogL) Object
- •Overview
- •Specification
- •Estimation
- •LogL Views
- •LogL Procs
- •Troubleshooting
- •Limitations
- •Examples
- •References
- •Part VI. Advanced Univariate Analysis
- •Chapter 30. Univariate Time Series Analysis
- •Unit Root Testing
- •Panel Unit Root Test
- •Variance Ratio Test
- •BDS Independence Test
- •References
- •Part VII. Multiple Equation Analysis
- •Chapter 31. System Estimation
- •Background
- •System Estimation Methods
- •How to Create and Specify a System
- •Working With Systems
- •Technical Discussion
- •References
- •Vector Autoregressions (VARs)
- •Estimating a VAR in EViews
- •VAR Estimation Output
- •Views and Procs of a VAR
- •Structural (Identified) VARs
- •Vector Error Correction (VEC) Models
- •A Note on Version Compatibility
- •References
- •Chapter 33. State Space Models and the Kalman Filter
- •Background
- •Specifying a State Space Model in EViews
- •Working with the State Space
- •Converting from Version 3 Sspace
- •Technical Discussion
- •References
- •Chapter 34. Models
- •Overview
- •An Example Model
- •Building a Model
- •Working with the Model Structure
- •Specifying Scenarios
- •Using Add Factors
- •Solving the Model
- •Working with the Model Data
- •References
- •Part VIII. Panel and Pooled Data
- •Chapter 35. Pooled Time Series, Cross-Section Data
- •The Pool Workfile
- •The Pool Object
- •Pooled Data
- •Setting up a Pool Workfile
- •Working with Pooled Data
- •Pooled Estimation
- •References
- •Chapter 36. Working with Panel Data
- •Structuring a Panel Workfile
- •Panel Workfile Display
- •Panel Workfile Information
- •Working with Panel Data
- •Basic Panel Analysis
- •References
- •Chapter 37. Panel Estimation
- •Estimating a Panel Equation
- •Panel Estimation Examples
- •Panel Equation Testing
- •Estimation Background
- •References
- •Part IX. Advanced Multivariate Analysis
- •Chapter 38. Cointegration Testing
- •Johansen Cointegration Test
- •Single-Equation Cointegration Tests
- •Panel Cointegration Testing
- •References
- •Chapter 39. Factor Analysis
- •Creating a Factor Object
- •Rotating Factors
- •Estimating Scores
- •Factor Views
- •Factor Procedures
- •Factor Data Members
- •An Example
- •Background
- •References
- •Appendix B. Estimation and Solution Options
- •Setting Estimation Options
- •Optimization Algorithms
- •Nonlinear Equation Solution Methods
- •References
- •Appendix C. Gradients and Derivatives
- •Gradients
- •Derivatives
- •References
- •Appendix D. Information Criteria
- •Definitions
- •Using Information Criteria as a Guide to Model Selection
- •References
- •Appendix E. Long-run Covariance Estimation
- •Technical Discussion
- •Kernel Function Properties
- •References
- •Index
- •Symbols
- •Numerics

Chapter 20. Instrumental Variables and GMM
This chapter describes EViews tools for estimating a single equation using Two-stage Least Squares (TSLS), Limited Information Maximum Likelihood (LIML) and K-Class Estimation, and Generalized Method of Moments (GMM).
There are countless references for the techniques described in this chapter. Notable textbook examples include Hayashi (2000), Hamilton (1994), Davidson and MacKinnon (1993). Less technical treatments may be found in Stock and Watson (2007) and Johnston and DiNardo (1997).
Background
A fundamental assumption of regression analysis is that the right-hand side variables are uncorrelated with the disturbance term. If this assumption is violated, both OLS and weighted LS are biased and inconsistent.
There are a number of situations where some of the right-hand side variables are correlated with disturbances. Some classic examples occur when:
•There are endogenously determined variables on the right-hand side of the equation.
•Right-hand side variables are measured with error.
For simplicity, we will refer to variables that are correlated with the residuals as endogenous, and variables that are not correlated with the residuals as exogenous or predetermined.
The standard approach in cases where right-hand side variables are correlated with the residuals is to estimate the equation using instrumental variables regression. The idea behind instrumental variables is to find a set of variables, termed instruments, that are both
(1) correlated with the explanatory variables in the equation, and (2) uncorrelated with the disturbances. These instruments are used to eliminate the correlation between right-hand side variables and the disturbances.
There are many different approaches to using instruments to eliminate the effect of variable and residual correlation. EViews offers three basic types of instrumental variable estimators: Two-stage Least Squares (TSLS), Limited Information Maximum Likelihood and K-Class Estimation (LIML), and Generalized Method of Moments (GMM).
Two-stage Least Squares
Two-stage least squares (TSLS) is a special case of instrumental variables regression. As the name suggests, there are two distinct stages in two-stage least squares. In the first stage,

56—Chapter 20. Instrumental Variables and GMM
TSLS finds the portions of the endogenous and exogenous variables that can be attributed to the instruments. This stage involves estimating an OLS regression of each variable in the model on the set of instruments. The second stage is a regression of the original equation, with all of the variables replaced by the fitted values from the first-stage regressions. The coefficients of this regression are the TSLS estimates.
You need not worry about the separate stages of TSLS since EViews will estimate both stages simultaneously using instrumental variables techniques. More formally, let Z be the matrix of instruments, and let y and X be the dependent and explanatory variables. The linear TSLS objective function is given by:
W(b) |
= (y – Xb)¢Z(Z¢Z)–1Z¢(y – Xb) |
(20.1) |
Then the coefficients computed in two-stage least squares are given by, |
|
|
bTSLS = |
(X¢Z(Z¢Z)–1Z¢X)–1X¢Z(Z¢Z)–1Z¢y , |
(20.2) |
and the standard estimated covariance matrix of these coefficients may be computed using:
ˆ |
= |
s |
2 |
(X¢Z(Z¢Z) |
–1 |
Z¢X) |
–1 |
(20.3) |
STSLS |
|
|
, |
where s2 is the estimated residual variance (square of the standard error of the regression). If desired, s2 may be replaced by the non-d.f. corrected estimator. Note also that EViews offers both White and HAC covariance matrix options for two-stage least squares.
Estimating TSLS in EViews
To estimate an equation using Two-stage Least Squares, open the equation specification box by choosing Object/New Object.../Equation… or
Quick/Estimate Equation…
Choose TSLS from the Method: combo box and the dialog will change to include an edit window where you will list the instruments.
Alternately, type the tsls keyword in the command window and hit ENTER.
In the Equation specification edit box, specify your dependent variable and independent
variables and enter a list of instruments in the Instrument list edit box.

Two-stage Least Squares—57
There are a few things to keep in mind as you enter your instruments:
•In order to calculate TSLS estimates, your specification must satisfy the order condition for identification, which says that there must be at least as many instruments as there are coefficients in your equation. There is an additional rank condition which must also be satisfied. See Davidson and MacKinnon (1993) and Johnston and DiNardo (1997) for additional discussion.
•For econometric reasons that we will not pursue here, any right-hand side variables that are not correlated with the disturbances should be included as instruments.
•EViews will, by default, add a constant to the instrument list. If you do not wish a constant to be added to the instrument list, the Include a constant check box should be unchecked.
To illustrate the estimation of two-stage least squares, we use an example from Stock and Watson 2007 (p. 438), which estimates the demand for cigarettes in the United States in 1995. (The data are available in the workfile “Sw_cig.WF1”.) The dependent variable is the per capita log of packs sold LOG(PACKPC). The exogenous variables are a constant, C, and the log of real per capita state income LOG(PERINC). The endogenous variable is the log of real after tax price per pack LOG(RAVGPRC). The additional instruments are average state sales tax RTAXSO, and cigarette specific taxes RTAXS. Stock and Watson use the White covariance estimator for the standard errors.
The equation specification is then,
log(packpc) c log(ravgprs) log(perinc)
and the instrument list is:
c log(perinc) rtaxso rtaxs
This specification satisfies the order condition for identification, which requires that there are at least as many instruments (four) as there are coefficients (three) in the equation specification. Note that listing C as an instrument is redundant, since by default, EViews automatically adds it to the instrument list.
To specify the use of White heteroskedasticity robust standard errors, we will select White in the Coefficient covariance matrix combo box on the Options tab. By default, EViews will estimate the
using the Estimation default with d.f. Adjustment as specified in Equation (20.3).
Output from TSLS
Below we show the output from a regression of LOG(PACKPC) on a constant and LOG(RAVGPRS) and LOG(PERINC), with instrument list “LOG(PERINC) RTAXSO RTAXS”.

58—Chapter 20. Instrumental Variables and GMM
Dependent Variable: LOG(PACKPC)
Method: Two-Stage Least Squares
Date: 04/15/09 Time: 14:17
Sample: 1 48
Included observations: 48
White heteroskedasticity-consistent standard errors & covariance
Instrument specification: LOG(PERINC) RTAXSO RTAXS
Constant added to instrument list
Variable |
Coefficient |
Std. Error |
t-Statistic |
Prob. |
|
|
|
|
|
|
|
|
|
|
C |
9.894956 |
0.959217 |
10.31566 |
0.0000 |
LOG(RAVGPRS) |
-1.277424 |
0.249610 |
-5.117680 |
0.0000 |
LOG(PERINC) |
0.280405 |
0.253890 |
1.104436 |
0.2753 |
|
|
|
|
|
|
|
|
|
|
R-squared |
0.429422 |
Mean dependent var |
4.538837 |
|
Adjusted R-squared |
0.404063 |
S.D. dependent var |
0.243346 |
|
S.E. of regression |
0.187856 |
Sum squared resid |
1.588044 |
|
F-statistic |
13.28079 |
Durbin-Watson stat |
1.946351 |
|
Prob(F-statistic) |
0.000029 |
Second-Stage SSR |
1.845868 |
|
Instrument rank |
4 |
J-statistic |
|
0.311833 |
Prob(J-statistic) |
0.576557 |
|
|
|
|
|
|
|
|
EViews identifies the estimation procedure, as well as the list of instruments in the header. This information is followed by the usual coefficient, t-statistics, and asymptotic p-values.
The summary statistics reported at the bottom of the table are computed using the formulae outlined in “Summary Statistics” on page 13. Bear in mind that all reported statistics are only asymptotically valid. For a discussion of the finite sample properties of TSLS, see Johnston and DiNardo (1997, p. 355–358) or Davidson and MacKinnon (1993, p. 221–224).
Three other summary statistics are reported: “Instrument rank”, the “J-statistic” and the “Prob(J-statistic)”. The Instrument rank is simply the rank of the instrument matrix, and is equal to the number of instruments used in estimation. The J-statistic is calculated as:
1 |
2 |
Z¢Z § T) |
–1 |
Z¢u |
(20.4) |
T u¢Z (s |
|
|
|||
--- |
|
|
|
|
|
where u are the regression residuals. See “Generalized Method of Moments,” beginning on page 67 for additional discussion of the J-statistic.
EViews uses the structural residuals ut = yt – xt¢bTSLS in calculating the summary statistics. For example, the default estimator of the standard error of the regression used in the covariance calculation is:
s2 = Âut2 § (T – k). |
(20.5) |
t |
|
These structural, or regression, residuals should be distinguished from the second stage residuals that you would obtain from the second stage regression if you actually computed the two-stage least squares estimates in two separate stages. The second stage residuals are

Two-stage Least Squares—59
given by u˜ t = yˆ t – xˆ t¢bTSLS , where the yˆ t and xˆt are the fitted values from the first-stage regressions.
We caution you that some of the reported statistics should be interpreted with care. For example, since different equation specifications will have different instrument lists, the reported R2 for TSLS can be negative even when there is a constant in the equation.
TSLS with AR errors
You can adjust your TSLS estimates to account for serial correlation by adding AR terms to your equation specification. EViews will automatically transform the model to a nonlinear least squares problem, and estimate the model using instrumental variables. Details of this procedure may be found in Fair (1984, p. 210–214). The output from TSLS with an AR(1) specification using the default settings with a tighter convergence tolerance looks as follows:
Dependent Variable: LOG(PACKPC)
Method: Two-Stage Least Squares Date: 08/25/09 Time: 15:04 Sample (adjusted): 2 48
Included observations: 47 after adjustments
White heteroskedasticity-consistent standard errors & covariance Instrument specification: LOG(PERINC) RTAXSO RTAXS
Constant added to instrument list
Lagged dependent variable & regressors added to instrument list
Variable |
Coefficient |
Std. Error |
t-Statistic |
Prob. |
|
|
|
|
|
|
|
|
|
|
C |
10.02006 |
0.996752 |
10.05272 |
0.0000 |
LOG(RAVGPRS) |
-1.309245 |
0.271683 |
-4.819022 |
0.0000 |
LOG(PERINC) |
0.291047 |
0.290818 |
1.000785 |
0.3225 |
AR(1) |
0.026532 |
0.133425 |
0.198852 |
0.8433 |
|
|
|
|
|
|
|
|
|
|
R-squared |
0.431689 |
Mean dependent var |
4.537196 |
|
Adjusted R-squared |
0.392039 |
S.D. dependent var |
0.245709 |
|
S.E. of regression |
0.191584 |
Sum squared resid |
1.578284 |
|
Durbin-Watson stat |
1.951380 |
Instrument rank |
7 |
|
J-statistic |
1.494632 |
Prob(J-statistic) |
0.683510 |
|
|
|
|
|
|
|
|
|
|
|
Inverted AR Roots |
.03 |
|
|
|
|
|
|
|
|
|
|
|
|
|
The Options button in the estimation box may be used to change the iteration limit and convergence criterion for the nonlinear instrumental variables procedure.
First-order AR errors
Suppose your specification is:
yt = xt¢b + wtg + ut
(20.6)
ut = r1ut – 1 + et

60—Chapter 20. Instrumental Variables and GMM
where xt is a vector of endogenous variables, and wt is a vector of predetermined variables, which, in this context, may include lags of the dependent variablezt . is a vector of instrumental variables not in wt that is large enough to identify the parameters of the model.
In this setting, there are important technical issues to be raised in connection with the choice of instruments. In a widely cited result, Fair (1970) shows that if the model is estimated using an iterative Cochrane-Orcutt procedure, all of the lagged leftand right-hand side variables (yt – 1, xt – 1, wt – 1 ) must be included in the instrument list to obtain consistent estimates. In this case, then the instrument list should include:
(wt, zt, yt – 1, xt – 1, wt – 1 ). |
(20.7) |
EViews estimates the model as a nonlinear regression model so that Fair’s warning does not apply. Estimation of the model does, however, require specification of additional instruments to satisfy the instrument order condition for the transformed specification. By default, the first-stage instruments employed in TSLS are formed as if one were running CochraneOrcutt using Fair’s prescription. Thus, if you omit the lagged leftand right-hand side terms from the instrument list, EViews will, by default, automatically add the lagged terms as instruments. This addition will be noted in your output.
You may instead instruct EViews not to add the lagged leftand right-hand side terms as instruments. In this case, you are responsible for adding sufficient instruments to ensure the order condition is satisfied.
Higher Order AR errors
The AR(1) results extend naturally to specifications involving higher order serial correlation. For example, if you include a single AR(4) term in your model, the natural instrument list will be:
(wt, zt, yt – 4, xt – 4, wt – 4 ) |
(20.8) |
If you include AR terms from 1 through 4, one possible instrument list is: |
|
(wt, zt, yt – 1, º, yt – 4, xt – 1, º, xt – 4, wt – 1, º, wt – 4 ) |
(20.9) |
Note that while conceptually valid, this instrument list has a large number of overidentifying instruments, which may lead to computational difficulties and large finite sample biases (Fair (1984, p. 214), Davidson and MacKinnon (1993, p. 222-224)). In theory, adding instruments should always improve your estimates, but as a practical matter this may not be so in small samples.
In this case, you may wish to turn off the automatic lag instrument addition and handle the additional instrument specification directly.

Two-stage Least Squares—61
Examples
Suppose that you wish to estimate the consumption function by two-stage least squares, allowing for first-order serial correlation. You may then use two-stage least squares with the variable list,
cons c gdp ar(1)
and instrument list:
c gov log(m1) time cons(-1) gdp(-1)
Notice that the lags of both the dependent and endogenous variables (CONS(–1) and GDP(– 1)), are included in the instrument list.
Similarly, consider the consumption function:
cons c cons(-1) gdp ar(1)
A valid instrument list is given by:
c gov log(m1) time cons(-1) cons(-2) gdp(-1)
Here we treat the lagged left and right-hand side variables from the original specification as predetermined and add the lagged values to the instrument list.
Lastly, consider the specification:
cons c gdp ar(1) ar(2) ar(3) ar(4)
Adding all of the relevant instruments in the list, we have:
c gov log(m1) time cons(-1) cons(-2) cons(-3) cons(-4) gdp(-1) gdp(-2) gdp(-3) gdp(-4)
TSLS with MA errors
You can also estimate two-stage least squares variable problems with MA error terms of various orders. To account for the presence of MA errors, simply add the appropriate terms to your specification prior to estimation.
Illustration
Suppose that you wish to estimate the consumption function by two-stage least squares, accounting for first-order moving average errors. You may then use two-stage least squares with the variable list,
cons c gdp ma(1)
and instrument list:
c gov log(m1) time
EViews will add both first and second lags of CONS and GDP to the instrument list.