Iterative Proportional Fitting Information, Code, and Links

Iterative Proportional Fitting for a Two-Dimensional Table
An informal description from May 2008 of two-dimensional IPF that I (Eddie Hunsinger) prepared for my coworkers and fellow researchers. Please feel free to offer comments or corrections. IPF is a big name for a pretty simple (but terrific) technique-- it is used quite a bit, but I think it could be used more. Nels Tomlinson handed down much of any knowledge and computer code that I have on IPF.

Iterative Proportional Fitting for a Three-Dimensional Table
A description of three-dimensional IPF (May 2008).

Iterative Proportional Fitting for a Four-Dimensional Table
A description of four-dimensional IPF (May 2008).

Iterative Proportional Fitting R Code
R code, supporting files and instruction/documentation to perform two-, three- and four-dimensional IPF. Though I did pieces of the development for the IPF functions, the heavy lifting (the bulk of the 2D and 3D functions) was done by Nels Tomlinson, my predecessor at the Alaska Department of Labor and Workforce Development.

Webb Sprague's Iterative Proportional Fitting SAS Code
A great SAS macro for two-dimensional iterative proportional fitting, developed by Webb Sprague, a researcher with the State of Washington. Please note this code has only been tested with some sample data (August 2011).

Damien Forthommme's ipfn: Iterative Proportional Fitting With N Dimensions For Python
From the README, "Iterative proportional fitting is an algorithm used is many different fields such as economics or social sciences, to alter results in such a way that aggregates along one or several dimensions match known marginals (or aggregates along these same dimensions)." The package includes NumPy and pandas versions of the algorithm. Here is a link to application and comparison of it in a Jupyter Notebook (January 2023).

A Particular IPF Application
An April 2011 message from me with description on use of IPF to reasonably fit sampled "Group Quarters" (GQ) (shared living facilities, as opposed to traditional households) data to separately-estimated GQ-type (e.g. prisons, dorms, etc.), GQ-county (location) and GQ-age (age of resident) control/marginal totals, given sparse and tightly-clustered sample-cell-data by type and county.

Generating Synthetic Unit-Record Data from Published Marginal Tables
A May 2007 paper by a professor from the University of Auckland that covers IPF and other techniques for cell estimation based on marginal totals, and offers computer code to perform these techniques.

Putting Iterative Proportional Fitting on the Researcher's Desk
An October 1999 paper by Paul Norman, a professor at the University of Leeds, that describes IPF and an MS Excel macro to perform IPF on two-dimensional tables.

Adjustment of a Sampled Frequency Table When the Expected Marginal Totals are Known
If you have JSTOR, here is a useful and historically important text about IPF from December 1940-- pp 439-442 presents an early documentation of the technique. Several problems with the paper have been noted since its publication, but that's ok. I've learned that there is an earlier (1937) documentation of the technique by a researcher named Kruithoff, but I haven't seen that paper and can't find a link to it (I'd love to see it, so please send me the link if you have it).


Eddie Hunsinger