Create a correlation matrix
genCorMat(nvars, cors = NULL)
number of rows and columns (i.e. number of variables) for correlation matrix
vector of correlations.
If the vector cors is not specified, a random correlation matrix is generated with no assumptions. If the vector is provided, it should be interpreted as the lower triangle of the correlation matrix, and is specified by reading down the columns. For example, if CM is the correlation matrix and nvars = 3, then CM[2,1] = cors, CM[3,1] = cors, and CM[3,2] = cors.
correlation matrix of size nvars x nvars
genCorMat(3, c(.3, -.2, .1)) genCorMat(3) genCorMat(5, c(.3, -.2, .1, .2, .5, .2, -.1, .3, .1, .2)) genCorMat(5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.