Iterative proportional fitting and independent variables I'm trying to understand the "classic" iterative proportional fitting (IPF) algorithm.
Does it always assume that the variables being analyzed are independent? If the variables are independent, then can't we just compute each joint count from the product of two marginal counts?
For example, in the wikipedia example referenced above, are the two variables (gender and handedness) independent? The final joint counts are
45.24 = 100 * 52/100 * 87/100
41.76 = 100 * 48/100 * 87/100
6.76 = 100 * 52/100 * 13/100
6.24 = 100 * 48/100 * 13/100

so no iterative algorithm is necessary.
 A: A variation of the IPF is frequently used in survey statistics to adjust for the error in the data, where it is known as the raking ratio adjustment. Initially it was proposed to deal with sampling error (the difference between the true proportions and the observed proportions due to the fact that not everybody is being observed), and these days it is used more to correct for non-sampling error (not all values are observed because of non-response). Starting from the sample values, the weights are adjusted so that a given margin corresponds to the known population value, until convergence. This algorithm solves a certain optimization problem of finding the joint distribution that is closest to that of the sample, yet satisfies the marginal distributions. See http://www.citeulike.org/user/ctacmo/article/10383730/.
Lacking any additional information about the joint distribution, the joint independence is, in a way, the most natural assumption you could possibly make.
A: You can use IPF to fit any log-linear models. If your model is relatively simple and has no interactions terms, then no iterations are required. For example the model being fitted in the wikipedia article is: $$\log m_{ij} = \beta_i + \beta_j .$$
However, if you are fitting a more complex model, perhaps with interactions over contingency tables with more than two dimensions then you will need to to iterate to find the mle. Agresti's chapter on log-linear models (in his Categorical Data Analysis book) explains which log-linear models can be solved directly, and which need an iterative solution.
