Deprecated. Use rk_weight()

weight(cons, inds, vars = NULL, iterations = 10)

Arguments

cons

A data frame containing all the constraints. This should be in the format of one row per zone, one column per constraint category. The first column should be a zone code; all other columns must be numeric counts.

inds

A data frame containing individual-level (survey) data. This should be in the format of one row per individual, one column per constraint. The first column should be an individual ID.

vars

A character vector of variables that constrain the simulation (i.e. independent variables)

iterations

The number of iterations the algorithm should complete. Defaults to 10

Value

A data frame of fractional weights for each individual in each zone with zone codes recorded in column names and individual id recorded in row names.

Examples

# Deprecated. Use rk_weight()