The classical use of iterative proportional fitting is to adjust frequencies to conform to new marginal totals. You can use the IPF subroutine to perform this kind of analysis. You supply a table that contains new margins and a table that contains old frequencies. The IPF subroutine returns a table of adjusted frequencies that preserves any higher-order interactions appearing in the initial table.
This example is a census study that estimates a population distribution according to age and marital status (Bishop, Fienberg, and Holland, 1975). Estimates of the distribution are known for the previous year, but only estimates of marginal totals are known for the current year. The following program adjusts the distribution of the previous year to fit the estimated marginal totals of the current year:
proc iml; mod={0.01 15}; /* Stopping criteria */ dim={3 8}; /* Marital status has 3 levels; age has 8 */ /* New marginal totals for age by marital status */ table={1412 0 0 , 1402 0 0 , 1174 276 0 , 0 1541 0 , 0 1681 0 , 0 1532 0 , 0 1662 0 , 0 5010 2634}; /* Marginal totals are known for both marital status and age */ config={1 2}; /* Use known distribution for initial values */ initab={1306 83 0 , 619 765 3 , 263 1194 9 , 173 1372 28 , 171 1393 51 , 159 1372 81 , 208 1350 108 , 1116 4100 2329}; call ipf(fit,status,dim,table,config,initab,mod); c={' SINGLE' ' MARRIED' 'WIDOWED/DIVORCED'}; r={'15 - 19' '20 - 24' '25 - 29' '30 - 34' '35 - 39' '40 - 44' '45 - 49' '50 OR OVER'}; print initab[colname=c rowname=r format=8.0 label='Known Distribution (Previous Year)'], fit[colname=c rowname=r format=8.2 label='Adjusted Estimates (Current Year)'];
The results are shown in Output 9.14.1.
Output 9.14.1: Iterative Proportional Fitting: Results
Known Distribution (Previous Year) | |||
---|---|---|---|
SINGLE | MARRIED | WIDOWED/DIVORCED | |
15 - 19 | 1306 | 83 | 0 |
20 - 24 | 619 | 765 | 3 |
25 - 29 | 263 | 1194 | 9 |
30 - 34 | 173 | 1372 | 28 |
35 - 39 | 171 | 1393 | 51 |
40 - 44 | 159 | 1372 | 81 |
45 - 49 | 208 | 1350 | 108 |
50 OR OVER | 1116 | 4100 | 2329 |
Adjusted Estimates (Current Year) | |||
---|---|---|---|
SINGLE | MARRIED | WIDOWED/DIVORCED | |
15 - 19 | 1325.27 | 86.73 | 0.00 |
20 - 24 | 615.56 | 783.39 | 3.05 |
25 - 29 | 253.94 | 1187.18 | 8.88 |
30 - 34 | 165.13 | 1348.55 | 27.32 |
35 - 39 | 173.41 | 1454.71 | 52.87 |
40 - 44 | 147.21 | 1308.12 | 76.67 |
45 - 49 | 202.33 | 1352.28 | 107.40 |
50 OR OVER | 1105.16 | 4181.04 | 2357.81 |