| ipf | R Documentation |
(Weighted) iterative proportional fitting (IPF)
## Standard implementation ipf(bottomMargin, rightMargin, maxit = 100, tol = 1e-4) ## with weights ipf_weighted(bottomMargin, rightMargin, weights, maxit = 100, tol = 1e-4)
bottomMargin |
numeric vector |
rightMargin |
numeric vector |
weights |
numeric vector (only use in |
maxit |
maximal number of iterations (default: |
tol |
numerical tolerance (default: |
Function ipf is an implementation of the iterative proportional fitting method of Deming and Stephan (1940) using a factor-estimation approach (cf. Batten and Boyce, 1986). Function ipf_weighted implements a weighted IPF method.
A matrix with dimensions: length(rightMargin) times length(bottomMargin)
You must not call this function unless you really know how it works! Also, the function does not check whether the provided arguments are meaningful. It is the user's responsibility to make sure that the arguments are properly specified.
Tobias Schoch
W. Edwards Deming and Frederick F. Stephan, 1940. On a Least Squares Adjustment of a Sampled Frequency Table When the Expected Marginal Totals are Known, The Annals of Mathematical Statistics 11, pp. 427–444.
David. F. Batten and David E. Boyce, 1986. Spatial interaction, transportation, and interregional commodity flow models. In: Regional economics. Amsterdam: North-Holland, pp. 357–401.