# 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 with`sdR`

to generate the correlations.- sdR
The variation in the correlations, provided to

`rnorm`

together with`meanR`

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

```
# NOT RUN {
createSigma(3, .5, .1);
# }
```

*Documentation reproduced from package userfriendlyscience, version 0.6-1, License: GPL (>= 2)*

### Community examples

Looks like there are no examples yet.