powered by
Compute the covariance between x and y.
x
y
covp(x, y)
a numeric vector.
An object with the covariance between x and y.
Compute the covariance between x and y using \(n\) (instead of \(n-1\) as in cov) in the denominator.
cov
If the length of x and y are different, the elements of the shortest one will be recycled as necessary.
# NOT RUN { x<- rnorm(100) y<- rnorm(100) covp(x, y) cov(x, y) # }
Run the code above in your browser using DataLab