Description Usage Arguments Value Examples
View source: R/standardize_weights.R
Divides each weight by the mean and converts missing weights to 0. The resulting weights will have a mean of 1 and sum to either the nominal sample size or the effective sample size, which is the nominal sample size divided by the Kish (1965) approximation of an overall survey design effect
1 | standardize_weights(weight, to_ess = FALSE, na_to_zero = TRUE)
|
weight |
A vector of weights. Coerced to |
to_ess |
Should the weights sum to the effective sample size? Defaults to |
na_to_zero |
Should missing weights become zero weights? Defaults to |
A vector of standardized weights.
1 2 3 | summary(dec13_excerpt$weight)
dec13_excerpt$weight <- standardize_weights(dec13_excerpt$weight)
summary(dec13_excerpt$weight)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.