WeightedCorrelation: Compute Weighted Correlations

Description Usage Arguments Examples

Description

Compute the weighted correlation.

Usage

1

Arguments

x

a matrix or vector to correlate with y.

y

a matrix or vector to correlate with x. If y is NULL, x will be used instead.

weights

an optional vector of weights to be used to determining the weighted mean and variance for calculation of the correlations.

Examples

1
2
3
4
5
 x <- sample(10,10)
 y <- sample(10,10)
 w <- sample(5,10, replace=TRUE)

WeightedCorrelation(x, y, w)

SciencesPo documentation built on May 29, 2017, 9:28 p.m.