wtd_mean: Weighted mean

Description Usage Arguments See Also

View source: R/survey.R

Description

Weighted mean

Usage

1
wtd_mean(x, w, na.rm = FALSE)

Arguments

x

numerical vector

w

vector of weights replicated to have same length as x

na.rm

if TRUE, drop units for which x is NA. Default: FALSE.

See Also

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, jk_wtd_means, lin_comb


gmonette/WWCa documentation built on May 14, 2017, 12:59 p.m.