4.2 Estimating Simultaneous-Equations Models


4.2.1 Identification

The equations of Klein's SEQM defined by (4.1) and (4.2) are motivated by economic theory. They are an attempt to write down in a parsimonious way the ``structure'' of the economy from an aggregate, macro perspective. The parameters of these equations are thus the proper targets of estimation: after all, they supposedly tell us ``how the economy works''. In the following sections, we will briefly discuss two approaches of estimating the parameters of a structural SEQM such as Klein's model.

A necessary condition for consistent estimation is identification. Identification in SEQMs is a serious issue and warrants an extended treatment that can't be provided in the format of this chapter. But any good econometrics textbook features an extensive discussion of this matter. See, for instance, Greene (1998) or Goldberger (1991).

Intuitively speaking, identification is difficult because of the interrelatedness of the variables, which makes it hard to disentangle their various relationships. A necessary and easily verified condition for identification in SEQMs is that the number of exogenous variables excluded from any equation must be as least as large as the number of endogenous variables included in that equation (``order condition'').

In Klein's model of equations (4.1) and (4.2), the endogenous variables are $ C_t,$ $ I_t,$ $ W^p_t,$ $ Y_t,$ $ K_t$ and $ P_t$ (note that the latter three are endogenous despite not being a left-hand side variable of any statistical equation). All other variables are exogenous or predetermined. You may verify that in the first equation of (4.1) there are two endogenous ($ C_t$ and $ P_t$) and six excluded exogenous variables ($ K_{t-1},$ $ Y_{t-1},$ $ A_{t},$ $ G_t,$ $ T_t$ and $ W^g_t$). Hence, the order equation is satisfied for this equation. Greene (1998) shows that the condition is satisfied for the entire system (as well as other, sufficient conditions for identification).


4.2.2 Some Notation

Let us write down the $ M$ statistical equations (i.e, the equations that have unknown coefficients and error terms) of the structural form (i.e., the equations as they are suggested by economics) of a SEQM :

\begin{displaymath}\begin{array}{l c l @{\,} l c l @{\,} l c l } \textrm{y}_1 & ...
... & \textrm{X}^T_M & {\gamma}_M & + & \varepsilon_M. \end{array}\end{displaymath}    

Focusing on the first equation, $ \textrm{y}_1$ is the left-hand side variable, $ \textrm{Y}_1$ is the vector of endogenous right-hand side variables, $ \textrm{x}_1$ is the vector of exogenous or predetrmined right-hand side variables and $ {\beta}_1$ and $ {\gamma}_1$ are the objects of interest: the unknown structural parameters of the model.

We can illustrate the notation by using, say, the $ M$-th equation of Klein's model introduced above: $ M=3$ (the coefficients of the identities in (4.2) are known and need not be estimated), $ \textrm{y}_M=W^p_t,$ $ \textrm{Y}=Y_t,$ $ {\beta}_M=\gamma_1,$ $ \textrm{X}^T_M=[1 \quad Y_{t-1} \quad A_t ]$, $ {\gamma}_M=[\gamma_0 \quad \gamma_2 \quad \gamma_3]^T$ and $ \varepsilon_M=\epsilon_{3t}.$

Suppose that we have $ T$ observations of all the variables of the model. Then we can write down the SEQM in terms of the data matrices and vectors as follows:

\begin{displaymath}\begin{array}{l c l @{\,} l c l @{\,} l c l } {y}_1 & = & {Y}...
...\beta}_M & + & {X}_M {\gamma}_M & + & {\epsilon}_M. \end{array}\end{displaymath}    

Using again the $ M$-th equation to illustrate the notation, $ {y}_M$ and $ {\epsilon}_M$ are $ T \,\times\, 1$ vectors whereas $ {Y}_M$ and $ {X}_M$ are matrices with $ n$ rows that have as many columns as $ \textrm{Y}^T_M$ and $ \textrm{X}^T_M,$ respectively.

Defining $ {Z}_m=({Y}_1, {X}_1)$ and $ {\delta}_m=({\beta}_M, {\gamma}_M)$ for $ m=1,\ldots,M$, we can write the system even more compactly as

\begin{displaymath}\begin{array}{l c l@{\,}l c l} {y}_1 & = & {Z}_1 & {\delta}_1...
... {y}_M & = & {Z}_M & {\delta}_M & + & {\epsilon}_M. \end{array}\end{displaymath} (4.3)

Estimating $ {\delta}_1,\ldots,{\delta}_M$ by applying ordinary least squares to each equation is not a consistent estimation procedure as some of the right-hand side variables are endogenous and therefore correlated with the error terms.

For instance, in the second equation of (4.1), $ P_t$ is correlated with the error term. This can be seen by substituting the first identity of (4.2) for $ X_t$ into the second identity of (4.2) and observing that $ P_t$ is a linear function of $ I_t.$


4.2.3 Two-Stage Least Squares

Endogenous regressors can be treated by instrumenting them and this is precisely what the method of two-stage least squares does.

  1. In the first stage, the endogenous regressor is regressed by ordinary least squares on all exogenous regressors and the predicted values of this regression are obtained. Denoting the matrix of observations of all exogenous or predetermined variables of the SEQM as $ {X}$ we can write the matrix of predicted values of the endogenous regressors of the $ m$-th equation as

    $\displaystyle {\hat{Y}}_{m} = {X}\{({X}^T{X})^{-1}{X}^T{Y}_m\}$ (4.4)

  2. In the second stage, the two-stage least squares estimator for equation $ m$ is obtained by regressing $ {y}_m$ on the fitted values $ {\hat{Y}}_{m}$ and the matrix of exogenous or predetermined regressors of equation $ m$, $ {X}_m.$

Using the notation of (4.5), Greene (1998) shows that the two-stage least squares estimator of the parameters of equation $ m$ can be written as

$\displaystyle {\widehat{\delta}}_{m,2SLS}$ $\displaystyle =$ $\displaystyle \{({Z}^T_m{X})({X}^T{X})^{-1}({X}^T{Z}_m)\}^{-1}
{Z}_m{X}({X}^T{X})^{-1}{X}^T{y}_m.$  
  $\displaystyle =$ $\displaystyle \{{\widehat{Z}}^T_m {\widehat{Z}}_m\}^{-1}{\widehat{Z}}^T_m {y}_m$ (4.5)

This procedure, applied to all equations $ m=1,\ldots,M,$ is consistent but not efficient. This is because it does not exploit the fact that the equations form a system or interdependent equations but rather estimates the equations one-by-one. In the following section, we will describe the three-stage least squares estimation procedure which builds on but also improves upon two-stage least squares.


4.2.4 Three-Stage Least Squares

Let us rewrite (4.5) such that the system nature of the SEQM is even more evident:

$\displaystyle \left( \begin{array}{c} {y}_1 \\ {y}_2 \\ \vdots \\ {y}_M \end{ar...
...}{c} {\epsilon}_1 \\ {\epsilon}_2 \\ \vdots \\ {\epsilon}_M \end{array} \right)$ (4.6)

(where $ {y},$ $ {Z}$ and $ {\epsilon}$ all have $ T \times M$ rows) or simply as

$\displaystyle {y} = {Z}{\delta}+ {\epsilon}$ (4.7)

Using this ``system'' notation, we can write the two-stage least squares estimator (4.7) for all $ M$ equations very compactly as

$\displaystyle {\widehat{\delta}}_{2SLS} = \{{\widehat{Z}}^T {\widehat{Z}}\}^{-1}{\widehat{Z}}^T {y},$ (4.8)

where
$\displaystyle {\widehat{Z}}$ $\displaystyle =$ \begin{displaymath}\left(
\begin{array}{c c c c}
{X}({X}^T{X})^{-1}{X}^T{Z}_1 & ...
... {0} & \cdots & {X}({X}^T{X})^{-1}{X}^T{Z}_M
\end{array}\right)\end{displaymath}  
  $\displaystyle =$ \begin{displaymath}\left(
\begin{array}{c c c c}
{\widehat{Z}}_1 & {0} & \cdots ...
...dots \\
{0}& {0} & \cdots & {\widehat{Z}}_M
\end{array}\right)\end{displaymath} (4.9)

Written in this notation, the two-stage least-squares estimator looks like a ``system'' estimator but it is really equation-by-equation instrumental variables regression.

As remarked earlier, this estimator is consistent but it is not efficient. A more efficient estimator is suggested by looking at the covariance matrix of the long residual vector $ {\epsilon}$ of (4.9).

$\displaystyle E[{\epsilon} \, {\epsilon}^T]={\bar{\Sigma}} = \left( \begin{arra...
...gma_{M2}{I} & \cdots & \sigma_{MM}{I} \end{array} \right) = {\Sigma}\otimes{I},$ (4.10)

where $ {I}$ is an $ T \times T$ identity matrix, $ \otimes$ denotes the Kronecker product and $ {\Sigma}$ is the covariance matrix of the error terms $ \epsilon_1, \epsilon_2,\ldots,\epsilon_M.$ This non-spherical covariance matrix suggestes to improve upon (4.10) by using generalized least squares. This is precisely the idea behind the three-stage least squares estimator.

Suppose we knew the covariance matrix $ {\Sigma}.$ Then a generalized least squares, instrumental variables estimator could be computed as

$\displaystyle {\delta}_{GLS} = \{{\widehat{Z}}^T({\Sigma}^{-1}\otimes{I}){\widehat{Z}}\}^{-1} {\widehat{Z}}^T ({\Sigma}^{-1}\otimes{I}){y}.$ (4.11)

In practice, $ {\Sigma}$ is unknown and has to be estimated. A consistent estimator of element $ (i,j)$ of $ {\Sigma}$ is based on the sum of squares of the residuals of the $ i$-th and $ j$-th equation after estimating each equation by two-stage least squares:

$\displaystyle \hat{\sigma}_{ij}=\frac{({y}_i-{Z}_i{\widehat{\delta}}_{i})^T ({y}_j-{Z}_j{\widehat{\delta}}_{j})}{T},$ (4.12)

where $ {\widehat{\delta}}_{i}$ and $ {\widehat{\delta}}_{j}$ are the two-stage least squares estimator for equations $ i$ and $ j$ as defined in (4.7). Estimating each element of $ {\Sigma}$ in this way defines the estimator $ {\widehat{\Sigma}}$ of $ {\Sigma}$ and allows to compute the feasible generalized lest squares estimator:

$\displaystyle {\widehat{\delta}}_{3SLS} = \{{\widehat{Z}}^T({\widehat{\Sigma}}^...
...I}){\widehat{Z}}\}^{-1} {\widehat{Z}}^T ({\widehat{\Sigma}}^{-1}\otimes{I}){y}.$ (4.13)

An estimator of the asymptotic covariance matrix of (4.15) is given by

$\displaystyle \widehat{\textrm{Asy. Var}}({\widehat{\delta}}_{3SLS} = \{{\widehat{Z}}^T({\widehat{\Sigma}}^{-1}\otimes{I}){\widehat{Z}}\}^{-1}$ (4.14)

Summing up, the three-stage least squares estimator of $ {\delta}$ in (4.9) is obtained by carrying out the following three-steps:
  1. The first stage is identical to the two-stage procedure: instruments for the endogenous regressors are computed as the predicted values of an ordinary least squares regression of each endogenous regressor on all exogenous regressors.
  2. In the second stage, the two-stage least squares estimator for each equation $ m$ is computed and the residuals are used according to (4.14) to obtain an estimate of $ {\Sigma},$ the covariance matrix of the error terms of the SEQM.
  3. In the third stage, the estimate of $ {\Sigma}$ is used to calculate the generalized least squares estimator defined in (4.15) and an estimate of its covariance matrix as described in (4.16)


4.2.5 Computation


{d3sls, cov3, d2sls} = 8206 seq (seqlist1, seqlist2)
estimates a SEQM via two-stage and three-stage least squares

The quantlet 8209 seq is all you need to estimate a SEQM with XploRe . It belongs to the metrics quantlib which you have to load before you can use 8218 seq :

  library("metrics")
8221 seq requires two inputs and will return two vectors and a matrix along with an ANOVA-type table in the output window. The two inputs are lists. The first list (seqlist1) is a list of matrices that contain the data. The second list (seqlist2) is a list of string vectors that contain variable names.
seqlist1
If there are $ M$ statistical equations (i.e., equations with unknown coefficents and an error term) in the system then seqlist1 is a list of $ M+2$ matrices. The first matrix consists of the cocatenated vectors of observations of the left-hand side variables. The next $ M$ matrices contain the observations of the right-hand side variables of the $ M$ statistical equations of the system. The last and ($ M+2$)nd matrix contains the observations of all exogenous and predetermined variables of the system. That is, the $ M+2$ matrices are:

\begin{displaymath}
\begin{array}{l l}
1. & ({y}_1, {y}_2, \dots , {y}_M)\\
2. ...
...vdots & \vdots \\
(M+1).& {Z}_M \\
(M+2).& {X}\\
\end{array}\end{displaymath}

seqlist2
is a list of $ M+2$ string vectors. Each vector contains the names of the variables that form the corresponding matrix in seqlist1. For instance, the first string vector of seqlist2 contains the names of the left-hand side variables of the system whereas the last string vector contains the names of all exogenous and predetermined variables of the system.
The XploRe code for the Klein's model will serve as an example:
  ; reading in the data
  data=read("klein.dat")

  ; getting rid of the missing values of the lagged variables
  data=data[2:rows(data),]

  ; assigning the columns of "data" to the variables
  C=data[,2]
  P=data[,3]
  Wp=data[,4]
  I=data[,5]
  K1=data[,6]
  Y=data[,7]
  Wg=data[,8]
  G=data[,9]
  T=data[,10]
  W=data[,11]
  P1=data[,12]
  Y1=data[,13]
  A=data[,14]

  ; preparing the matrices that form seqlist1
  ; first matrix: concatenated vectors 
  ;                                of left-hand side variables
  y=C~I~Wp
  ; a column of "1"s for constant term
  ONE=matrix(rows(data),1)
  ; second through (M+1)st matrix: 
  ;                      matrices of right-hand side variables
  z1=P~P1~W~ONE
  z2=P~P1~K1~ONE
  z3=Y~Y1~A~ONE
  ; (M+2)nd matrix: matrix of instruments 
  ;                     (exogenous and predetermined variables)
  x=ONE~G~T~Wg~A~P1~K1~Y1

  ; forming a list of matrices
  seqlist1=list(y,z1,z2,z3,x)

  ; now we will prepare the string vectors that will form 
  ; seqlist2 vector with names of left-hand side variables
  yl="C"|"I"|"Wp"
  ; vectors with names of right-hand side variables 
  ;                                    of equations 1 though M
  l1="P"|"P1"|"W"|"ONE"
  l2="P"|"P1"|"K1"|"ONE"
  l3="E"|"E1"|"A"|"ONE"

  ; vector with names of instruments
  xl="ONE"|"G"|"T"|"Wg"|"A"|"P1"|"K1"|"Y1"

  ; putting the string vectors into a list
  seqlist2=list(yl,l1,l2,l3,xl)

  ; finally, we call the seq-quantlet
  {d1,s,d2}=seq(seqlist1,seqlist2)
8229 XAGseq01.xpl

8234 seq produces two kinds of output: ANOVA-style tables in the output window and coefficient estimates and their estimated standard errors as vectors or matrices.

There is a table of estimation results both for the two-stage (shown first) and three-stage least squares procedures (shown last). Both tables are designed to be easily readable and self-explanatory. We hope that you are going to agree after looking at the three-stage least squares table for the Klein's model:

  [ 1,] "====================================================="
  [ 2,] "   3stage Least-squares estimates"
  [ 3,] "====================================================="
  [ 4,] "EQ   dep. var.              R2"
  [ 5,] "====================================================="
  [ 6,] " 1   C                      0.980     "
  [ 7,] " 2   I                      0.826     "
  [ 8,] " 3   Wp                     0.986     "
  [ 9,] "====================================================="
  [10,] "VARIABLE    Coef.Est.        Std.Err.          t"
  [11,] "--------------------------------------------------"
  [12,] "P              0.125          0.108          1.155"
  [13,] "P1             0.163          0.100          1.624"
  [14,] "W              0.790          0.038         20.826"
  [15,] "ONE           16.441          1.305         12.603"
  [16,] "--------------------------------------------------"
  [17,] "P             -0.013          0.162         -0.081"
  [18,] "P1             0.756          0.153          4.942"
  [19,] "K1            -0.195          0.033         -5.990"
  [20,] "ONE           28.178          6.794          4.148"
  [21,] "--------------------------------------------------"
  [22,] "E              0.400          0.032         12.589"
  [23,] "E1             0.181          0.034          5.307"
  [24,] "A              0.150          0.028          5.358"
  [25,] "ONE            1.797          1.116          1.611"
  [26,] "====================================================="
  [27,] "INSTRUMENTS     Mean        Std.Dev.          "
  [28,] "--------------------------------------------------"
  [29,] "ONE            1.000          0.000"
  [30,] "G              9.914          3.910"
  [31,] "T              6.805          2.032"
  [32,] "Wg             5.119          1.957"
  [33,] "A              0.000          6.205"
  [34,] "P1            16.376          4.028"
  [35,] "K1           200.495          9.919"
  [36,] "Y1            57.986          8.919"
  [37,] "====================================================="
Besides showing the estimation results in the output window you can also access some of them as vectors or matrices. Specifically, the following quantities are returned by 8237 seq :
d3sls
the vector of three-stage least squares estimates of the elements of $ {\delta}$ in (4.9). It is computed according to (4.15).
cov3
the estimated covariance matrix of the three-stage least squares estimator, computed according to (4.16).
d2sls
the vector of two-stage least squares estimates of the elements of $ {\delta}$ in (4.9). It is obtained by computing (4.7) for each equation and stacking-up the resulting vectors.
In the following section, we will use 8240 seq to estimate a money-demand system.