ipf {ipfr} | R Documentation |
Re-weight a Seed Table to Marginal Controls
Description
Re-weight a Seed Table to Marginal Controls
Usage
ipf(
seed,
targets,
relative_gap = 0.01,
absolute_gap = 1,
max_iterations = 50,
min_weight = 1e-04,
verbose = FALSE
)
Arguments
seed |
A |
targets |
A |
relative_gap |
target for convergence. Maximum percent change to allow
any seed weight to move by while considering the process converged. By
default, if no weights change by more than 1
The process is said to be converged if either |
absolute_gap |
target for convergence. Maximum absolute change to allow
any seed weight to move by while considering the process converged. By
default, if no weights change by more than 10, the process has converged.
The process is said to be converged if either |
max_iterations |
maximum number of iterations to perform, even if convergence is not reached. |
min_weight |
Minimum weight to allow in any cell to prevent zero weights. Set to .0001 by default. Should be arbitrarily small compared to your seed table weights. |
verbose |
Print details on the maximum expansion factor with each
iteration? Default |
Value
the seed data frame
with a column of weights appended for each
row in the target data.frames