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.
createSigma(nVar, meanR = 0.3, sdR = 0, diagonal = 1)
- The number of variables in the correlation matrix.
The average correlation, provided to
sdRto generate the correlations.
The variation in the correlations, provided to
meanRto generate the correlations.
- The value on the diagonal of the returned matrix: will normally be 1.
A matrix of nVar x nVar.
createSigma(3, .5, .1);