Learn R Programming

survey (version 2.4)

rake: Raking of survey design

Description

Raking uses iterative post-stratification to match marginal distributions of a survey sample to known population margins.

Usage

rake(design, sample.margins, population.margins, control = list(maxit =
10, epsilon = 1, verbose=FALSE))

Arguments

design
A survey design with replicate weights
sample.margins
list of formulas or data frames describing sample margins
population.margins
list of tables describing corresponding population margins
control
maxit controls the number of iterations. Convergence is declared if the maximum change in a table entry is less than epsilon. If epsilon<1< code=""> it is taken to be a fraction of the total sampling weight.

Value

  • A raked survey design.

Details

Raking is known to converge for any table without zeros, and for any table with zeros for which there is a joint distribution with the given margins and the same pattern of zeros. The `margins' need not be one-dimensional. The algorithm works by repeated calls to postStratify, perhaps the least efficient possible implementation.

See Also

as.svrepdesign, svrepdesign, postStratify