WeightedVariance: Weighted variance

Description Usage Arguments Value

Description

Weighted variance

Usage

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

Arguments

x

an object containing the values whose weighted variance is to be computed

w

a numerical vector of weights the same length as x giving the weights to use for elements of x

na.rm

a logical value indicating whether NA values in x should be stripped before the computation proceeds

Value

a length-one numeric vector


danielmarcelino/SciencesPo documentation built on Oct. 20, 2019, 1:15 a.m.