ipf: Reweight a Seed Table to Marginal Controls

Description Usage Arguments Value

Description

Reweight a Seed Table to Marginal Controls

Usage

1
2
ipf(seed, targets, relative_gap = 0.01, absolute_gap = 1,
  max_iterations = 50, min_weight = 1e-04, verbose = FALSE)

Arguments

seed

A data frame including a weight field and necessary colums for matching to marginal targets.

targets

A named list of data frames. Each name in the list defines a marginal dimension and must match a column from the seed table. The data frame associated with each name must start with an identical column named cluster. Each row in the target table defines a new cluster (these could be TAZs, tracts, districts, etc.), and every target table must have the same number of rows/clusters. The other column names define the marginal categories that targets are provided for.

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 relative_gap or absolute_gap parameters have been met.

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 relative_gap or absolute_gap parameters have been met.

max_iterations

maximimum 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 FALSE.

Value

the seed data frame with a column of weights appended for each row in the target dataframes


pbsag/ipfr documentation built on May 24, 2019, 10:38 p.m.