deff_calc: Calculate the design effect of a sample
Description
deff_calc returns a single number
Usage
deff_calc(w)
Value
A number
Arguments
w
a vector of weights
Details
This function returns the design effect of a given sample using the formula
length(w)*sum(w^2)/(sum(w)^2).
It is designed for use in the moe family of functions. If any weights are equal to 0, they are removed prior to calculation.