Skip to contents

Uses the Kish effective sample size approximation: n_eff = (sum w)^2 / sum(w^2) so SE = sd_w / sqrt(n_eff), where sd_w is the weighted standard deviation.

Usage

weighted_se(x, w)

Arguments

x

Numeric vector of values.

w

Numeric vector of weights, same length as x.

Value

A single numeric SE value.