coop (version 0.6-2)

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.

See Also

cosine, pcor, and covar

Examples

Run this code
# NOT RUN {
x <- matrix(rnorm(10*3), 10, 3)
cov.wt(x)

# }

Run the code above in your browser using DataCamp Workspace