weighted.mean {surveybootstrap}R Documentation

Compute the weighted mean

Description

Given a vector of values and a vector of weights, compute the weighted mean

Usage

weighted.mean(x, w, na.rm = FALSE)

Arguments

x

The vector of values

w

The vector of weights

na.rm

if TRUE, only consider elements of x that are not missing (and their corresponding entries in w). Defaults to FALSE.

Value

The weighted mean


[Package surveybootstrap version 0.0.3 Index]