Matrix Balancing by the Ordinary RAS Method¶
In work with input-output analysis, one frequently needs to balance a table to known row and column totals. Three methods of scaling are offered in G7: ordinary RAS, proportional scaling RAS (psras), and right-direction RAS (rdras). In additional, outside information may be imposed using the “precondition” features described below.
The RAS commands are:
- ras|psras|rdras [<-f|c>] <matrix>[(r rgroup)][(c cgroup)]<rowctrl><colctrl> [yr][r|c][-maxiter][-precon] [-tolerance]
where:
- -f|c:
specifies the flow (default) or the coefficient mode,
- ras|psras|rdras:
specifies the method of scaling to be used,
- matrix:
is the name of the matrix whose elements are to be balanced,
- (r rgroup):
- (c cgroup):
are options that determine which rows and columns are included,
- rowctrl:
- colctrl:
are vectors that contain the row and column totals,
- yr:
optionally specifies the year for which the matrix is to be balanced. If a year is not specified, the matrix is balanced over the period specified by the current fdates.
- r|c:
optionally specifies whether the sum of the row totals or the sum of the column totals controls the calculations if the two are not the same.
- -maxiter:
optionally determines maximum number of iterations. The default is 100.
- -precon:
optionally specifies that name of a file containing the preconditions that are to be imposed.
- -tolerance:
optionally specifies the tolerance for the convergence test. The default value is 0.000002.
If one or more of row and/or column totals are questionable, the matrix still may be balanced by a special use of proportional scaling RAS, which is explained in Balancing Matrices with Uncertain Totals.