View source: R/design_effect.R
effective_sample_size | R Documentation |
This function calculates the effective sample size implied by the
supplied weights. Because weighting inflates variance of quantities of
interest, the effective sample size of a weighted sample is less than the
nominal sample size. This function calls design_effect
. If an
outcome is not provided, design_effect
implements the
estimator from Kish (1992), which assumes no correlation between weights
and outcomes. If an outcome is provided, the function implements Spencer
(2000).
effective_sample_size(weights, outcome = NULL)
weights |
The weights for which an implied effective sample size is designed |
outcome |
An vector outcome of interest. If NULL, this function returns the Kish (1992) estimator of design effects. If numeric data is provided, this function returns the Spencer (2000) estimator of design effects conditional on the correlation between supplied weights and the outcome of interest. |
A numeric effective sample size, which may be non-integer.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.