Learn R Programming

NonProbEst (version 0.2.4)

sc_weights: Calculates Schonlau and Couper weights

Description

Computes weights from propensity estimates using the (1 - pi_i)/pi_i formula introduced in Schonlau and Couper (2017).

Usage

sc_weights(propensities)

Arguments

propensities

A vector with the propensities associated to the elements of the convenience sample.

Value

A vector with the corresponding weights.

Details

The function takes the vector of propensities \(\pi(x)\) and calculates the weights to be applied in the Hajek estimator using the formula that can be found in Schonlau and Couper (2017). For an individual i, weight is calculated as follows: $$w_i = \frac{1 - \pi_i (x)}{\pi_i (x)}$$

References

Schonlau, M., & Couper, M. P. (2017). Options for conducting web surveys. Statistical Science, 32(2), 279-292.

Examples

Run this code
# NOT RUN {
covariates = c("education_primaria", "education_secundaria")
data_propensities = propensities(sampleNP, sampleP, covariates)
sc_weights(data_propensities$convenience)
# }

Run the code above in your browser using DataLab