Sam Balancing The Sam Balancing option is one of the Square Matrices options. It creates a new header containing original values scaled so that row and column totals are equal. In more detail, the new matrix B(i,j) is related to the old matrix A(i,j) by: B(i,j) = A(i,j)*[fac(i)/fac(j)] where A(i,j) > 0 B(i,j) = A(i,j)*[fac(j)/fac(i)] where A(i,j) < 0 B(i,j) = 0 where A(i,j) = 0 The routine finds and applies values for the vector fac such that each row sum of B = the corresponding column sum of B In other words, B is a "balanced" matrix, as similar as possible to A. Note that diagonal entries of the input matrix are unchanged (they do not affect row-col differences). The routine will work well where in the normal case: •all rows and columns have several non-zero entries; •most entries are positive, and negatives are small; and •initial row and column sums are all >0; but it will also succeed in many other cases. For example, suppose that •row 3 has just one entry and that is negative, and •col 3 has just one entry and that is positive. The only way to scale row and col so they have the same sum is to multiply both by zero ! This may not be what you intend, so please check the output carefully ! The method of scaling, described above, is equivalent to the Schneider & Zenios 'Diagonal Similarity Scaling' (DSS) method, mentioned in section 4.3 of the paper Constructing SAMs for Development Policy Analysis by Jeffery Round in the journal Economic Systems Research, Vol. 15, No. 2, June 2003. It is equivalent to an entropy minimization approach where: •all entries are given equal weight (with respect to proportional change); and •there are no additional constraints, apart from rowsums=colsums. You would need to use a different, more flexible, routine if you needed differential weights, or extra constraints. However, this routine should be suitable for ironing out small SAM imbalances. URL of this topic: www.copsmodels.com/webhelp/viewhar/hc_sambal.htm Link to full GEMPACK Manual Link to GEMPACK homepage |