covp: Covariance

Description Usage Arguments Details Value See Also Examples

View source: R/covp.R

Description

Compute the covariance between x and y.

Usage

1
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

1
2
3
4
x<- rnorm(100)
y<- rnorm(100)
covp(x, y)
cov(x, y)

optimStrat documentation built on Nov. 11, 2020, 5:07 p.m.