WeightedVariance: Weighted Variance

Description Usage Arguments Examples

Description

Compute the weighted variance.

Usage

1

Arguments

x

a numeric vector.

weights

a numeric vector of weights for x.

na.rm

a logical if NA should be disregarded.

Examples

1
2
3
4
wt=c(1.23, 2.12, 1.23, 0.32, 1.53, 0.59, 0.94, 0.94, 0.84, 0.73)
x = c(5, 5, 4, 4, 3, 4, 3, 2, 2, 1)

WeightedVariance(x, wt)

SciencesPo documentation built on May 19, 2017, 8:16 p.m.

Search within the SciencesPo package
Search all R packages, documentation and source code