Systems Estimation (Linear) |
RATS can estimate systems of linear equations with the instruction SUR. This uses the technique of Seemingly Unrelated Regressions for standard regressions, and three-stage least squares for instrumental variables.
If you need to estimate a system of non-linear equations, or have restrictions across equations other than simple equality constraints, use the instruction NLSYSTEM. If you can (reasonably) use SUR, you should do so, as it is much faster and is usually much easier to set up.
SUR is very different from the single-equation estimation instructions. You specify the system using a set of equations, not regressor lists on supplementary cards. You need to construct these equations in advance using EQUATION, or possibly by LINREG with the option DEFINE. The equations can be organized into a MODEL using GROUP, or you can input the equation information directly into SUR.
Technical Information
We use the following basic notation:
\begin{equation} y_{it} = X_{it} \beta + u_{it} ,t = 1, \ldots ,T;{\rm{ }}i = 1, \ldots ,N \end{equation}
\begin{equation} E{\kern 1pt} {\kern 1pt} \left[ {u_t u'_t } \right] = \Sigma ,u'_t = \left( {u_{1t} , \ldots ,u_{Nt} } \right) \end{equation}
The variables should be defined over the same intervals across the cross-section elements \(i\). RATS drops from the calculation any entry \(t\) for which any variable involved in the regression is missing.
These estimators are described in Section 10.2 of Greene (2012). The GLS (SUR) estimator is
\begin{equation} \beta = \left( {{\bf{X'}}\left( {\Sigma ^{ - {\bf{1}}} \otimes {\bf{I}}} \right){\bf{X}}} \right)^{ - 1} \left( {{\bf{X'}}\left( {\Sigma ^{ - {\bf{1}}} \otimes {\bf{I}}} \right){\bf{y}}} \right) \end{equation}
where \(\beta \) and \({\bf{y}}\) are formed by stacking vectors from the \(N\) equations, and \(\bf{X}\) is formed by stacking augmented \(X_i\) matrices: matrices with columns of zeros for explanatory variables in the other equations. The covariance matrix of the estimates is
\begin{equation} \left( {{\bf{X'}}\left( {\Sigma ^{ - {\bf{1}}} \otimes {\bf{I}}} \right){\bf{X}}} \right)^{ - 1} \end{equation}
If you specify a matrix with the CV option, RATS will use that matrix for \(\Sigma\). Otherwise, it computes OLS (for SUR) or 2SLS (for SUR(INST)) estimates of the equations and uses the estimated covariance matrix of the residuals:
Note that some programs use a slightly different estimate of \(\Sigma\) preferring the formula
\begin{equation} \hat \Sigma = \frac{1}{{T - K}}\sum\limits_{t = 1}^T {\hat u_t \hat u'_t } \end{equation}
where \(K\) is the number of regressors per equation (assuming a system with equations of a similar form). This doesn’t affect the coefficient estimates, since a scale factor in \(\Sigma\) will cancel out. However, the standard errors will be slightly different.
Iterating
By default, RATS applies a single application of feasible GLS, as described above. However, if the ITER option is non-zero, RATS recomputes \(\Sigma\) and re-estimates the system. It repeats this process until either the iteration limit is exceeded, or the change in coefficients is small. The convergence criterion is controlled by the option CVCRIT.
The %SIGMA matrix and the CVOUT option save the \(\Sigma\) at the final estimates, which is not the same as the \(\Sigma\) used in computing the estimates.
Inputting a \(\Sigma\)
You can input your own value for the \(\Sigma\) matrix using the CV option. As noted above, by default RATS computes \(\Sigma\) from a preliminary estimate of the model. If you have too few observations to estimate \(\Sigma\) freely (you need at least as many observations as equations), you will have to input \(\Sigma\) yourself.
Note that the estimates of the standard errors of coefficients will be incorrect if your input \(\Sigma\) doesn’t provide estimates of the residual variances.
Examples
The example SUR.RPF computes joint GLS estimates for a two company subset for Grunfeld’s investment equations. It also demonstrates hypothesis tests and restrictions across equations.
The Wald test procedures work somewhat differently for SUR than for LINREG and other single-equation estimation procedures. The main differences are:
•You cannot use EXCLUDE and SUMMARIZE for a test involving a regressor which appears in more than one equation of the system. This is because these two instructions list restrictions according to the regressor names, which won’t uniquely identify a coefficient.
•With RESTRICT, MRESTRICT and TEST, keep in mind that the coefficient numbers are based upon the position in the “stacked” system. For instance, if the first equation has 3 variables, the coefficients in the second equation will have numbers 4, 5, etc.
•RESTRICT(CREATE) will not work because it is designed for a single equation and cannot properly handle the printing for a multivariate system. Do RESTRICT(REPLACE) followed by SUR(CREATE) instead.
•RATS uses the second set of formulas for the Wald tests. Thus, it reports the tests as \(\chi ^2\) not \(F\).
For instance, the following tests for equality between the “F” (market value) coefficients. In the stacked coefficient vector, the FGE coefficient is position 2 and the FWEST is position 5:
restrict(title="Test of equality of F coefficients") 1
# 2 5
# 1 -1 0
As described in the final point, the test statistic shows as a \(\chi ^2\).
Test of equality of F coefficients
Chi-Squared(1)= 3.203911 with Significance Level 0.07346239
SUR can estimate a system subject to equality constraints across all the equations using the EQUATE option:
sur(model=grunfeld,equate=||2,3||)
which forces the second (Fxx) and third (Cxx) coefficients to be equal across equations. Note that this rearranges the coefficient vector, so the coefficients which are forced equal are listed first. In this case, there are actually only four free coefficienents: Fxx, Cxx, CONSTANT in GE and CONSTANT in WEST. The output will display the information in the usual equation by equation form, but you will note that the coefficient numbers are out-of-sequence.
For more complicated restrictions, use non-linear methods instead even if the model is linear.
Transforming Equations into FRMLs
If you need to transform the equations into formulas for system simulation, you have two options.
1.You can use a set of FRML instructions with the EQUATION option after the SUR instruction:
sur(inst) 3
# conseq
# investeq
# profeq
frml(equation=conseq) consfrml
frml(equation=investeq) invfrml
frml(equation=profeq) proffrml
2.You can use the FRML option on the EQUATION instructions you use to define the model.
Generalized Method of Moments
While the default behavior for SUR with the INSTRUMENTS option is three stage least squares, it has options for supporting more general weightings of the instruments.
Copyright © 2025 Thomas A. Doan