Learn R Programming

surveysd (version 1.3.1)

kishFactor: Kish Factor

Description

Compute the design effect due to unequal weighting.

Usage

kishFactor(w, na.rm = FALSE)

Value

The function will return the the kish factor

Arguments

w

a numeric vector with weights

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

Author

Alexander Kowarik

Details

The factor is computed acording to 'Weighting for Unequal P_i', Leslie Kish, Journal of Official Statistics, Vol. 8. No. 2, 1992 $$ deff = \sqrt n \sum_j w_j^2 / (\sum_j w_j)^2$$

Examples

Run this code
kishFactor(rep(1,10))
kishFactor(rlnorm(10))

Run the code above in your browser using DataLab