cov2() is similar to cov() but has an additional
argument. The denominator $n$ (bias = TRUE) can be
used (instead of $n-1$) to give a biased estimator of
the (co)variance.
Usage
cov2(x, y = NULL, bias = TRUE)
Arguments
x
A numeric vector, matrix or data.frame.
y
A numeric vector, matrix or data.frame.
bias
A logical value. If bias = TRUE, $n$ is
used to give a biased estimator of the (co)variance. If
bias = FALSE, $n-1$ is used (default: TRUE).
Value
C
Estimation of the variance (resp. covariance) of
x (resp. x and y).