version: 1.1
help for ras Dec. 22nd, 2021

Title

ras - Use RAS Method (Biproportional Scaling Method) to update input-output matrices.

Syntax

ras varlist , n(#) [options]

varlist - The varlist's data must be equal to matrix [A X U V] and have no missing-value. A is the base year's matrix of inter-industry input-output cofficients (the technical input coefficients matrix or input-output matrix, n*n), and it can be calculated from the matrix of internal demand (internal consumption) and total output. X is the updated year's total output, which is a column vector (n*1). U is column vector (n*1) which is equal to the row sums of the updated year's internal demand matrix. V is column vector (n*1) whose transpose is equal to the column sums of the updated year's internal demand matrix.

You can use "var*", "var1-var100", "var2 var3 var5-var98" to refer to a varlist in Stata. For more details, see varlist.

n(#) - Number of iterations of RAS technology. A row iteration and a column iteration are considered a complete iteration. # must be an integer greater than 0. If you want only execute row iteration in the last iteration, please see option "half".

options

a Generate several variables containing the upgrade year's expected inter-industry input-output cofficients matrix (the technical input coefficients matrix).

r Generate several variables containing the matrix R of RAS method. R is a diagonal matrix.

s Generate several variables containing the matrix S of RAS method. S is a diagonal matrix.

half The last RAS iteration will be executed a half (only execute row iteration, only R).

(If you do not select any options of "a r s", the program will choose "a" by default.)

(Expected internal demand matrix of the updated year Z=RZ°S. Z° is preliminary expected internal demand matrix of the updated year, which is calculated based on the base year's inter-industry input-output cofficients matrix A and the upgraded year's total output X, Z°=A*diag(X). The upgrade year's expected inter-industry input-output cofficients matrix is equal to Z multiplied by the inverse matrix of diag(X).)

Description

Ras module helps you use RAS Method (Biproportional Scaling Method) to update the input-output matrices.

RAS Method

RAS Method (Biproportional Scaling Method) is a method to update input-output matrices. Before using the RAS method, you need to calculate preliminary expected internal demand matrix of the updated year through the formula "A*diag(X)". A is the base year's matrix of inter-industry input-output cofficients and X is the updated year's total output. In one iteration RAS multiplies rows in a way that their totals would be the same as some desired row totals U and then it multiplies columns in a way that their totals would be the same as some desired column totals V. The multiplication of columns will lead to violation of row totals and vice versa so the multiple iterations must be performed. If the row and column totals are consistent, the results of RAS will converge to a matrix with row totals U and column totals X.

Example

Suppose a country has the following Input-Output Table (IOT) in the base year.

+
+

+
| | Industry 1 Industry 2 Industry 3 Final output |
| | Expenditure |
+
+

+
| Industry 1 | 1389.98 6747.85 621.37 1946.43 10705.64 |
| Industry 2 | 2565.57 80134.15 11773.03 38863.81 133336.56 |
| Industry 3 | 459.68 18771.27 17656.34 27215.17 64102.46 |
| Value-added | 6290.41 27683.29 34051.71 |
| output | 10705.64 133336.56 64102.46 |
+
+

+

Its internal demand (internal consumption) matrix in the base year is

+ +
| 1389.98 6747.85 621.37 |
| 2565.57 80134.15 11773.03 |
| 459.68 18771.27 17656.34 |
+ +

Then we can calculate the base year's inter-industry input-output cofficients matrix A

+ +
| 0.129836 0.050608 0.009693 |
| 0.239646 0.600992 0.183660 |
| 0.042938 0.140781 0.275439 |
+ +

(Vector X) Suppose the total output in the upgrated year is

+ +
| 11012.40 |
| 135535.31 |
| 79225.64 |
+ +

(Vector U) Suppose the sum of each department's products used for internal consumption in the upgrated year is

+ +
| 8506.69 |
| 91331.67 |
| 43613.43 |
+ +

(Vector V') Suppose the sum of each department's internal consumption in the upgrated year is

+ +
| 4467.17 102264.78 36719.84 |
+ +

Then you can get a series of variables as follows.

var1 var2 var3 var4 var5 var6
0.129836 0.050608 0.009693 11012.40 8506.69 4467.17
0.239646 0.600992 0.183660 135535.31 91331.67 102264.78
0.042938 0.140781 0.275439 79225.64 43613.43 36719.84

According to Syntax, the order of variables needs to meet the order "A X U V".

If we want to do two RAS iterations, we can execute the command "ras var1 var2 var var4 var5 var6, n(2) a r s" or the command "ras var1-var6, n(2) a r s".

The program will generate new variables _RAS_A*, _RAS_R*, _RAS_S* to store the matrix A, R, S.

And the screen will print some informations as follows.

Error & Error Rate:

6.809756 .0800517654318655%
30.19754 .0330636007547902%
-37.00827 -.084855220164759%

Error (Max Abs.): -37.00827

Error_rate (Max Abs.): -.084855220164759%

Error is the difference between the row totals of the internal consumer matrix obtained after the last iteration and the row totals U we input. Error_rate is the ratio of Error to row totals U.

References

[1] Bacharach, Michael. Biproportional matrices and input-output change. Vol. 16. CUP Archive, 1970.

[2] Parikh, Ashok. "Forecasts of input-output matrices using the RAS method." The review of economics and statistics (1979): 477-481.

[3] V Holý, and K Šafr. "The Use of Multidimensional RAS Method in Input-Output Matrix Estimation." (2017).

[4] OECD: Input-Output Tables https://www.oecd.org/sti/ind/input-outputtables.htm

Author

Xia P.S.

University of Chinese Academy of Sciences

Email: xia_ps@yeah.net