Description Usage Arguments Value Author(s) See Also Examples
This function is made to quickly generate a Sigma matrix of the type required by mvrnorm. By specifying the number of variables, the mean correlation, and how much variation there should be in the correlations, it's easy to quickly generate a correlation matrix.
1 | createSigma(nVar, meanR = 0.3, sdR = 0, diagonal = 1)
|
nVar |
The number of variables in the correlation matrix. |
meanR |
The average correlation, provided to |
sdR |
The variation in the correlations, provided to |
diagonal |
The value on the diagonal of the returned matrix: will normally be 1. |
A matrix of nVar x nVar.
Gjalt-Jorn Peters
Maintainer: Gjalt-Jorn Peters <gjalt-jorn@userfriendlyscience.com>
1 | createSigma(3, .5, .1);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.