covp: Covariance

View source: R/covp.R

covpR Documentation

Covariance

Description

Compute the covariance between x and y.

Usage

covp(x, y)

Arguments

x

a numeric vector.

y

a numeric vector.

Details

Compute the covariance between x and y using n (instead of n-1 as in cov) in the denominator.

If the length of x and y are different, the elements of the shortest one will be recycled as necessary.

Value

An object with the covariance between x and y.

See Also

cov

Examples

x<- rnorm(100)
y<- rnorm(100)
covp(x, y)
cov(x, y)

optimStrat documentation built on Aug. 24, 2023, 9:09 a.m.