For the matrix balancing problem it is well known that the RAS algorithm and an Entropy model give the same results. Here is a small example with the data taken from http://www.lexjansen.com/mwsug/1992/MWSUG92013.pdf.
In the models below the row and column totals are known while the inner part of the matrix is estimated. The goal is to find a nearby matrix such that the row and column sums are equal to the given row and column totals. For many economic problems it is important we preserve the zeros.
The RAS algorithm implementation can easily be improved by iterating until convergence is observed instead of the fixed number of iterations. One big advantage of using an Entropy model instead of an RAS-like algorithm is that it is easy to add side-constraints. This can often be very important in practical situations.
RAS Algorithm
$ontext |
Entropy Model
$ontext |
Results
---- 73 ------------------------------------------------------------------- ---- 73 PARAMETER A1 s1 s2 s3 s4 s5 s6 s7 PA 229.652 374.869 375.099 100.028 686.238 212.542 + s8 s9 s10 rowTotal sum diff PA 50.572 2029.000 2029.000 -2.2737E-13 |
No comments:
Post a Comment