Adjusts a table A so its row and column sums match
prescribed targets while preserving cross-product ratios (the
RAS/IPF algorithm) – TDA's mpfit. A must
be non-negative with strictly positive row and column sums, as
must the target row_sums/col_sums, and their totals
should agree (TDA warns but does not refuse otherwise).
Usage
tda_mpfit(
A,
row_sums,
col_sums,
max_iter = 100,
eps = 1e-06,
dir = tempfile("tda")
)Value
A list: B, the fitted table; iterations, how
many were used; accuracy, the final deviation reached.
See also
Other matrix algebra:
tda_mcel(),
tda_mcent(),
tda_mch(),
tda_mcross(),
tda_mdiag(),
tda_mev(),
tda_mevs(),
tda_midf(),
tda_midf1(),
tda_midf2(),
tda_midf3(),
tda_minvs(),
tda_mkmet(),
tda_mkp(),
tda_mmul(),
tda_mnc(),
tda_mnrow(),
tda_mpbl(),
tda_mpinv(),
tda_mpit(),
tda_mple(),
tda_mpz(),
tda_mscal1(),
tda_msqrtd(),
tda_msvd(),
tda_mwvec()