Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

weighted

Weighted Co-Operation


Description

An optimized, efficient implemntation for computing weighted covariance, correlation, and cosine similarity. Similar to R's cov.wt().

Arguments

x

A matrix or data.frame.

wt

A vector of weights or scalar weight.

method

Either "unbiased" or "ml". Unlike R, case is ignored.

Details

See ?coop-package for implementation details.

Author(s)

Drew Schmidt

See Also

Examples

x <- matrix(rnorm(10*3), 10, 3)
cov.wt(x)

coop

Co-Operation: Fast Covariance, Correlation, and Cosine Similarity Operations

v0.6-2
BSD 2-clause License + file LICENSE
Authors
Drew Schmidt [aut, cre], Christian Heckendorf [ctb] (Caught some memory errors.)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.