weightedcor: weightedcor

Description Usage Arguments Value Examples

View source: R/DCARS.R

Description

Calculates weighted Pearson correlation between x and y. This function has been superceded by weightedPearson() and similar matrix function weightedPearson_matrix()

Usage

1
weightedcor(x, y, w)

Arguments

x

x and y are data vectors

y

x and y are data vectors

w

weight vector

Value

weighted correlation value between x and y

Examples

1
2
3
4
x = rnorm(100)
y = rnorm(100)
w = runif(100)
weightedcor(x,y,w)

shazanfar/DCARS documentation built on Oct. 14, 2020, 11:11 a.m.