calculate_deff: Calculate design effect

Description Usage Arguments Value Examples

View source: R/calculate_deff.R

Description

Takes a vector of weights and calculates the design effect, or the proportional increase in variance due to weighting. Calculated using the Kish (1965) approximation.

Usage

1
calculate_deff(weight, include_zeroes = FALSE)

Arguments

weight

A vector of weights. Non-numeric weights will be coerced to numeric.

include_zeroes

Should zero weights be included when calculating n, sd_wt, and deff? Defaults to FALSE.

Value

A tibble containing the following columns:

n The sample size

sd_wt The standard deviation of the weights

deff The Kish approximation of an overall survey design effect

ess The effective sample size

moe The design-adjusted margin of error at 95

Examples

1

pewresearch/pewmethods documentation built on March 27, 2020, 7:22 p.m.