jk_wtd_means | R Documentation |
Jacknife estimates of the weighted mean with a stratified sample. Weights are adjusted to take the change in n into account when obtaining the jacknife estimate dropping an observation within a stratum.
jk_wtd_means(x, by, w, check = TRUE, FUN = wtd_mean)
x |
numerical vector |
by |
stratification variable or list of stratification variable |
w |
vector of weights, e.g. Horvitz-Thomson weights or renormed version |
check |
(default: TRUE) check that 'w' is constant within levels of 'by' |
FUN |
(default: wtd_mean) function used to obtain estimate |
wtd_mean
for weighted means, link{lin_comb}
for linear
combinations, jk_wtd_mean_se
for a jacknife estimate of the SE of a weighted mean
and jk_lin_comb_se
for a jacknife estimate of the SE of a linear combination.
Other Post-stratification survey functions:
jk_wtd_mean_se()
,
lin_comb()
,
wtd_mean()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.