Coleman, Charles (2015): SAS® Macros for Constraining Arrays of Numbers. Published in: Southeast SAS Users Group 2015 Proceedings
There is a more recent version of this item available. 

PDF
PO131.pdf Download (167kB)  Preview 
Abstract
Many applications require constraining arrays of numbers to controls in one or two dimensions. Example applications include survey estimates, disclosure avoidance, inputoutput tables, and population and other estimates and projections. If the results are allowed to take on any nonnegative values, raking (a.k.a. scaling) solves the problem in one dimension and twoway iterative raking solves it in two dimensions. Each of these raking macros has an option for the user to output a dataset containing the rakes. The problem is more complicated in one dimension if the data can be of any sign, the socalled “plusminus” problem, as simple raking may produce unacceptable results. This problem is addressed by generalized raking, which preserves the structure of the data at the cost of a nonunique solution. Often, results are required to be rounded so as to preserve the original totals. The CoxErnst algorithm accomplishes an optimal controlled rounding in two dimensions. In one dimension, the Greatest Mantissa algorithm is a simplified version of the CoxErnst algorithm.
Each macro contains error control code. The macro variable &errorcode is made available to the programmer to enable error trapping.
Item Type:  MPRA Paper 

Original Title:  SAS® Macros for Constraining Arrays of Numbers 
Language:  English 
Keywords:  RAS. RangeRAS, RRAS, IPF, iterative proportionate fitting, raking, controlled rounding, CoxErnst algorithm 
Subjects:  C  Mathematical and Quantitative Methods > C0  General > C02  Mathematical Methods C  Mathematical and Quantitative Methods > C6  Mathematical Methods ; Programming Models ; Mathematical and Simulation Modeling > C67  InputOutput Models D  Microeconomics > D5  General Equilibrium and Disequilibrium > D57  InputOutput Tables and Analysis J  Labor and Demographic Economics > J1  Demographic Economics > J10  General R  Urban, Rural, Regional, Real Estate, and Transportation Economics > R1  General Regional Economics > R15  Econometric and InputOutput Models ; Other Models 
Item ID:  77650 
Depositing User:  Dr. Charles Coleman 
Date Deposited:  20 Mar 2017 16:57 
Last Modified:  03 Oct 2019 17:14 
References:  Akers, D.S. and J.S. Siegel. 1965. “National Census Survival Rates, by Color and Sex, for 1950–1960.” Current Population Reports, series P23, no. 15. Washington, DC: U.S. Bureau of the Census. Bacharach, M. 1970. Biproportional Matrices and Inputoutput Change. Cambridge: Cambridge University Press. Bregman, L.M. 1967. “Proof of the Convergence of Sheleikhovskii’s Method for a Problem with Transportation Constraints.” USSR Computational Mathematics and Mathematical Physics 1(1), 191–204 . Causey, B.D., L. H. Cox and L. R. Ernst. 1985. “Applications of Transportation Theory to Statistical Problems.” Journal of the American Statistical Association. 80(392), 903–909. Censor, Y. and S. A. Zenios. 1991. “IntervalConstrained Matrix Balancing.” Linear Algebra and Its Applications. 150, 393421. Coleman, C. D. 2006a. “Generalized Raking.” Manuscript, Washington, DC: U.S. Census Bureau. Coleman, C. D. 2006b. “The Greatest Mantissa Algorithm.” Manuscript, Washington, DC: U.S. Census Bureau. Cox, L. H. 2003. “On Properties of MultiDimensional Statistical Tables.” Journal of Statistical Planning and Inference. 117(2), 251–273. Cox, L. H. and Lawrence R. Ernst, 1982, “Controlled Rounding,” INFOR. 20, 423–452. Fagan, J. and B. Greenberg, “Making Tables Additive in the Presence of Zeros,” Statistical Research Division Report No. CENSUS/SRD/RR84/17. Washington, DC: U.S. Bureau of the Census. Available at http://www.census.gov/srd/papers/pdf/rr8417.pdf. Lenzen M., B. Gallego and R. Wood. 2009. “Matrix Balancing under Conflicting Information.” Economic Systems Research. 21(1), 23–440. Sands, R. 2003. “A SAS® Macro for the Controlled Rounding of One and TwoDimensional Tables of Real Numbers,” NESUG 2003: Proceedings. Available at http://www.nesug.org/html/Proceedings/nesug03/st/st001.pdf. SAS Institute. No date. “A Transportation Problem.” Available at http://support.sas.com/documentation/cdl/en/ormpug/59679/HTML/default/viewer.htm#optmodel_sect5.htm. Schneider, M. H. and S. A. Zenios. 1990. “A Comparative Study of Algorithms for Matrix Balancing.” Operations Research. 38(3), 439–455. Temurshoev U., R. E. Miller, and M. C. Bouwmeester. 2013. “A Note on the GRAS Method.” Economic Systems Research. 25(3), 361–367. Tyndall, R. 2007. “Give Your Macro Code an Extreme Makeover: Tips for Even the Most Seasoned Macro Programmer.” SAS Institute Technical Note TS739. Available at http://support.sas.com/techsup/technote/ts739.pdf. 
URI:  https://mpra.ub.unimuenchen.de/id/eprint/77650 
Available Versions of this Item
 SAS® Macros for Constraining Arrays of Numbers. (deposited 20 Mar 2017 16:57) [Currently Displayed]