Description Usage Arguments Value Author(s) Examples
This functions converts a covariance matrix S
to a correlation matrix
fast and efficiently.
1 2 3 | cov2corArma(S)
cov2cor(S)
|
S |
A square covariance matrix. |
A square correlation matrix.
Anders Ellern Bilgrau <anders.ellern.bilgrau (at) gmail.com>
1 2 3 4 5 6 7 8 9 | X <- createData(n = 11, m = 4)
S <- cov(X)
stats::cov2cor(S)
cov2corArma(S)
if (require(microbenchmark)) {
microbenchmark(A = cov2corArma(S),
B = stats::cov2cor(S),
C = cov2cor(S))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.