View source: R/quality_functions.R
eff_n | R Documentation |
Computes Kish's effective sample size or weighting efficiency for a
survey.design
object.
eff_n(design) weight_eff(design)
design |
An |
Kish's effective sample size is a frequently-used, general metric to
indicate how much uncertainty and error increase due to weighting.
Effective sample size is calculated as sum(weights(design))^2 / sum(weights(design)^2)
.
Weighting efficiency is eff_n(design) / sum(weights(design))
.
While weighting efficency and effective sample size are frequently use,
they are less valid than the standard errors produced by
survey::svymean()
and related functions from the survey
package. In particular, they ignore clustering and stratification in
sample designs, and covariance between weighting variables and outcome variables.
As such, these metrics should be used with caution
A numeric value, indicating effective sample size (for eff_n()
)
or weighting efficiency (for weight_eff()
)
Kish, Leslie. 1965. Survey Sampling New York: Wiley.
gles17_weighted <- rakesvy(design = gles17, gender ~ c("Male" = .495, "Female" = .505), eastwest ~ c("East Germany" = .195, "West Germany" = .805) ) eff_n(gles17_weighted) weight_eff(gles17_weighted)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.