Example 9.14 Iterative Proportional Fitting

The classical use of iterative proportional fitting is to adjust frequencies to conform to new marginal totals. 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.

The following 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. You want to adjust the distribution of the previous year to fit the estimated marginal totals of the current year. Here is the program:

proc iml;

   /* Stopping criteria */
mod={0.01 15};

   /* Marital status has 3 levels. age has 8 levels. */
dim={3 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 start-up 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
   'POPULATION DISTRIBUTION ACCORDING TO AGE AND MARITAL STATUS',,
   'KNOWN DISTRIBUTION (PREVIOUS YEAR)',,
   initab [colname=c rowname=r format=8.0] ,,
   'ADJUSTED ESTIMATES OF DISTRIBUTION (CURRENT YEAR)',,
   fit [colname=c rowname=r format=8.2] ;

The results are shown in Output 9.14.1.

Output 9.14.1: Iterative Proportional Fitting: Results

POPULATION DISTRIBUTION ACCORDING TO AGE AND MARITAL STATUS

KNOWN DISTRIBUTION (PREVIOUS YEAR)

initab
  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 OF DISTRIBUTION (CURRENT YEAR)

fit
  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