Description Usage Arguments Details Value Note Examples
Weighted total and mean (Horvitz-Thompson and Hajek estimators)
1 2 3 | weighted_total(x, w, na.rm = FALSE)
weighted_mean(x, w, na.rm = FALSE)
|
x |
a numeric vector |
w |
a numeric vector of weights |
na.rm |
a logical value indicating whether |
-
Estimate (scalar)
wgtmeantotal
is a generic name for the functions documented.
1 2 3 4 | x <- c(0.1, 0.35, 0.05, 0.1, 0.15, 0.05, 0.2)
weighted_total(x, x)
x <- c(0.1, 0.35, 0.05, 0.1, 0.15, 0.05, 0.2)
weighted_mean(x, x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.