Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

pollster (version 0.1.6)

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.

Examples

Run this code
deff_calc(illinois$weight)

Run the code above in your browser using DataLab