combine_weighting_functions: Combine weight functions from two sampling frames

Description Usage Arguments Details Value

View source: R/combine_weighting_functions.R

Description

With multi-stage sampling, it is sometimes necessary to combine the weights from two sampling frames (e.g. stratified cluster sampling). This function let's you create a new weight function from two existing weight functions created with weighting_fun_from_samplingframe().

Usage

1
combine_weighting_functions(weights_function_1, weights_function_2)

Arguments

weights_function_1

The weight function from the outer sampling frame (the 'larger' scale; Records in one group of the outer sampling frame can belong to different strata in the inner sampling frame.)

weights_function_2

The weight function from the inner sampling frame (the 'smaller' scale; Records in the same group of the inner sampling frame must also belong to the same group in the outer sampling frame.)

Details

The returned function combines two sets of weights so that

Value

returns a function that takes a dataframe as input and returns a vector of weights


mabafaba/surveyweights documentation built on Sept. 28, 2019, 8:18 p.m.