createSigma
createSigma: convenience function for mvrnorm
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.
 Keywords
 datagen
Usage
createSigma(nVar, meanR = 0.3, sdR = 0, diagonal = 1)
Arguments
 nVar
 The number of variables in the correlation matrix.
 meanR

The average correlation, provided to
rnorm
together withsdR
to generate the correlations.  sdR

The variation in the correlations, provided to
rnorm
together withmeanR
to generate the correlations.  diagonal
 The value on the diagonal of the returned matrix: will normally be 1.
Value

A matrix of nVar x nVar.
See Also
Examples
createSigma(3, .5, .1);
Community examples
Looks like there are no examples yet.