weight_wwc: Weight a survey using post-stratification with weighting...

Description Usage Arguments Details Value Examples

Description

Weight a survey using post-stratification with weighting indicator(s) from ACS tables

Usage

1
2
3
weight_wwc(mysurvey, ..., force_edu = FALSE)

weight_wwc_(mysurvey, dots, force_edu = FALSE)

Arguments

mysurvey

A survey data frame, such as that created by simulate_survey

...

Weighting indicator(s) to be used for post-stratification. One or more of sex, raceethnicity, age, and/or education which must be columns in the survey data frame. Both age and education cannot be used for post-stratification at the same time because of how the ACS tables are organized.

force_edu

Should the weighting be done with the ACS education tables? Defaults to FALSE; cannot be TRUE if age is one of the weighting indicators

dots

List of weighting indicator(s) as string(s)

Details

weight_wwc is given bare names while weight_wwc_ is given strings and is therefore suitable for programming with. One column of mysurvey must be geography, to indicate what ACS data to use for post-stratification weighting.

Value

The original survey data frame with 1 column added, weight, the post-stratification weight for each row in the survey.

Examples

1
2
3
4

heathermkrause/WWC documentation built on May 17, 2019, 3:20 p.m.