calculates sampling weights for the questionnaire responses
Usage
weight_responses(
cluster_bg,
n_obs,
N,
lvl,
sublvl,
previous_sublvl,
sampling_method,
cluster_labels,
resp_labels,
sum_pop,
verbose
)Arguments
- cluster_bg
dataset with background questionnaire
- n_obs
list with the number of elements per level
- N
list of numeric vector with the population size of each sampled cluster element on each level
- lvl
number of the current level
- sublvl
number of the current sub-level (element within level)
- previous_sublvl
number of the sub-level of the parent level
- sampling_method
can be "SRS" for Simple Random Sampling or "PPS" for Probabilities Proportional to Size
- cluster_labels
character vector with the names of each cluster level
- resp_labels
character vector with the names of the questionnaire respondents on each level
- sum_pop
total population at each level (sampled or not)
- verbose
if
TRUE, prints output messages