Learn R Programming

weightTAPSPACK (version 0.1)

simpleWeight: Find weights for survey data

Description

Find weights for survey from a dataframe of observations and population margins. This function performs a raking process based on the population margins specified by the user.

Usage

simpleWeight(data, pop.margins, names = c(~agegend, ~ethm, ~educat, ~regmetro, ~incomcat, ~ppnet), trunc_at = 5)

Arguments

data
A dataframe of observations and values for population categories
pop.margins
A list of known population parameters
names
The names of the population parameters. The dataframe MUST include variables with the same names as the population parameters specified.
trunc_at
A numeric object specifying where to truncate the weights (what should the max weight be?) - default is 5

Value

A vector of weights

See Also

weightTAPSPACK weightTAPS variablesTAPS weightTAPSoutput subsetTAPS attritTAPS multipleImp hotdeckImp wavesTAPS