Description Usage Arguments Value Examples
View source: R/qlr_functions.R
Generate a random correlation (or covariance) matrix
1 | random_cor_cov(size = 6, cors = c("high", "mid", "low"), sds = NULL)
|
size |
The number of variables. Defaults to 6. |
cors |
The size of the correlations between variables. Current options include "high", "mid", and "low". Future iterations may include "toeplitz" and maybe other options |
sds |
A vector containing the standard deviation of each of the variables. Defaults to NULL, in which case, it randomly generates standard deviations that range from .2 to 10 |
A list containing
cor - the randomly generated correlation matrix
sd - a vector of standard deviations
cov.mat - the variance/covariance matrix
1 2 | random_cor_cov(size=4, cors="low")
random_cor_cov(size=3, cors="mid", sds = c(5,5,5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.