RATS 11.1
RATS 11.1

Gauss-Seidel is a simple, and usually effective, algorithm for solving simultaneous equation models which contain non-linearities in some form. It solves
 

\(\begin{array}{*{20}{c}}{{y_1} = {f_1}\left( {{y_2},{y_3}, \ldots ,{y_n}} \right) + {u_1}} \\ {{y_2} = {f_2}\left( {{y_1},{y_3}, \ldots ,{y_n}} \right) + {u_2}} \\ \vdots  \\ {{y_n} = {f_n}\left( {{y_1},{y_2}, \ldots ,{y_{n - 1}}} \right) + {u_n}} \\ \end{array}\)

 

by setting \(y_1\) using the first equation, using initial values for the other y’s, then setting \(y_2\) using the second equation, using the initial values of \(y_3\) to \(y_n\) and the just computed value for \(y_1\), etc. From this, it’s clear why each endogenous variable can be on the left side of one and only one equation.

 

This process continues until convergence, which means that the y’s change little from one iteration to the next. Convergence is not guaranteed, however, even if a solution exists, and even if the system is linear. For instance, the system below won’t converge as written. It will converge if the equations are renormalized, and it will also converge with the use of a damping factor of .5 or less—see "Achieving Convergence" below.

 

\(\begin{array}{*{20}{c}}{{y_1}{\rm{ = }}{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {y_2} + 5} \\{{y_2} =  - 2{y_1} + 3} \\ \end{array}\)

 

Note the following:

The initial values for the \(y\)'s come from the data series themselves, if available; otherwise the last historic value is taken. In multiple step forecasts, the step \(k\) solution initializes step \(k+1\).

Convergence is considered to be achieved when all endogenous variables satisfy \(\min {\kern 1pt} {\kern 1pt} \left( {{\kern 1pt} {\kern 1pt} \left| {{\kern 1pt} {\kern 1pt} \frac{{{y_k} - y_k^0}}{{y_k^0}}{\kern 1pt} {\kern 1pt} } \right|{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} ,{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} \left| {{\kern 1pt} {\kern 1pt} {y_k} - y_k^0{\kern 1pt} {\kern 1pt} } \right|} \right){\kern 1pt} {\kern 1pt} {\kern 1pt}  < \varepsilon \)

 

where \({y_k^0}\) is the value from the previous iteration. That is, the percentage change is less than ε for larger values, and the absolute change is less than ε for smaller ones (less than 1.0). You control ε with the CVCRIT option on the instructions: FORECAST, SIMULATE, STEPS, or THEIL.


These instructions also have the options ITERS=number of iterations, and DAMP=damping factor which apply to the Gauss–Seidel solution procedure.

Achieving Convergence

If you have problems getting convergence, there are several adjustments which you can make. Obviously, if a (non-linear) system has no solution, nothing will work.

Increase the ITER option from the default of 50. This can help if the procedure is converging, but just moving very slowly.

Reorder the equations. This is probably a hit-or-miss strategy, since it may be hard to identify the source of the poor behavior.

Use the DAMP option. DAMP=\(\lambda\) causes RATS to use

\({y_k} = \left( {1 - \lambda } \right){\kern 1pt} {\kern 1pt} y_k^0 + \lambda {\kern 1pt} {\kern 1pt} \left( {{f_k}\left(  \ldots  \right) + u} \right)\)

a weighted average of the old and new values. The default is \(\lambda = 1\). Taking a value of \(\lambda < 1\) will slow the solution process, but a small enough value of \(\lambda\) will eliminate the explosive behavior of systems like the one above.

 

If you’re getting NA’s for some or all of your forecasts, it is almost certainly because you have some exogenous variables which aren’t defined during your forecast period.
 


Copyright © 2026 Thomas A. Doan