Logo
Munich Personal RePEc Archive

SAS® Macros for Constraining Arrays of Numbers

Coleman, Charles (2015): SAS® Macros for Constraining Arrays of Numbers. Published in: Southeast SAS Users Group 2015 Proceedings

Warning
There is a more recent version of this item available.
[thumbnail of PO-131.pdf]
Preview
PDF
PO-131.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, input-output 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 two-way 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 so-called “plus-minus” 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 Cox-Ernst algorithm accomplishes an optimal controlled rounding in two dimensions. In one dimension, the Greatest Mantissa algorithm is a simplified version of the Cox-Ernst algorithm.

Each macro contains error control code. The macro variable &errorcode is made available to the programmer to enable error trapping.

Available Versions of this Item

Atom RSS 1.0 RSS 2.0

Contact us: mpra@ub.uni-muenchen.de

This repository has been built using EPrints software.

MPRA is a RePEc service hosted by Logo of the University Library LMU Munich.