generateCorMat {cellWise} R Documentation

## Generates correlation matrices

### Description

This function generates correlation matrices frequently used in simulation studies.

### Usage

generateCorMat(d, corrType = "ALYZ", CN = 100, seed = NULL)


### Arguments

 d The dimension of the correlation matrix. The resulting matrix is d \times d. corrType The type of correlation matrix to be generated. Should be one of: "ALYZ": Generates a correlation matrix as in Agostinelli et. al (2015). "A09": Generates the correlation matrix defined by ρ_{jh} = (-0.9)^{|h-j|}. Note that the option "ALYZ" produces a randomly generated correlation matrix. CN Condition number of the correlation matrix. Only used for corrType = "ALYZ". seed Seed used in set.seed before generating the correlation matrix. Only relevant for corrType = "ALYZ".

### Value

A d \times d correlation matrix of the given type.

### Author(s)

J. Raymaekers and P.J. Rousseeuw

### References

C. Agostinelli, Leung, A., Yohai, V. J., and Zamar, R. H. (2015). Robust Estimation of Multivariate Location and Scatter in the Presence of Cellwise and Casewise Contamination. Test, 24, 441-461.

Rousseeuw, P.J., Van den Bossche W. (2018). Detecting Deviating Data Cells. Technometrics, 60(2), 135-145. (link to open access pdf)

J. Raymaekers and P.J. Rousseeuw (2020). Handling cellwise outliers by sparse regression and robust covariance. Arxiv: 1912.12446. (link to open access pdf)

### See Also

generateData

### Examples

d     <- 5
Sigma <- generateCorMat(d, corrType = "ALYZ", seed = 1)
Sigma


[Package cellWise version 2.2.5 Index]