Description Usage Arguments Value Examples
Generates a valid correlation matrix of desired size. Repeatedly augments until desired size is met. Currently implimented in both R and C++. The C++ version is faster while the R version is easier for the expected user base to read and modify as needed.
1 2 | RandomCorm(nvars, buff = sqrt(.Machine$double.eps))
RandomCormCPP(nvars, buff = sqrt(.Machine$double.eps))
|
nvars |
numeric size of desired correlation matrix |
buff |
numeric. A buffer to avoid numeric positive non-definiteness. |
A valid nvars by nvars correlation matrix.
1 2 | set.seed(1234)
RandomCormCPP(5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.