Learn R Programming

survey (version 2.4)

postStratify: Post-stratify a replicate weight survey

Description

Post-stratification adjusts the sampling and replicate weights so that the joint distribution of a set of post-stratifying variables matches the known population joint distribution. The advantage of post-stratification is that sampling frames need not be available for the strata.

Usage

postStratify(design, strata, population, partial = FALSE)

Arguments

design
A survey design with replicate weights
strata
A formula or data frame of post-stratifying variables
population
A table, xtabs or data.frame with population frequencies
partial
if TRUE, ignore population strata not present in the sample

Value

  • A new survey design object.

Details

The population totals can be specified as a table with the strata variables in the margins, or as a data frame where one column lists frequencies and the other columns list the unique combinations of strata variables (the format produced by as.data.frame acting on a table object).

See Also

as.svrepdesign, svrepdesign