noisecor: Add noise to any user specified correlation matrix

Description Usage Arguments Value Examples

Description

From Appendix A2. This is the core algorithm for adding noise to an arbitrary positive semi-definite matrix. The choice of eidim (M in the paper) provides flexibilty. If ei (M) is small (between 2 and 5) then many of the dot product terms will be large, yielding a very noisy coefficient matrix. If M is large the computation is still cheap. Other choices are discussed in the paper. This version has been modified to remove loops.

Usage

1
noisecor(cormat, epsilon = 0.01, eidim = 2)

Arguments

cormat

the correlation matrix to which noise is to be added.

epsilon

epsilon maximum entry-wise random noise.

eidim

dimension of the noise.

Value

The noise corrupted correlation matrix.

Examples

1
 noise.iden <- noisecor(diag(15), epsilon = .5, eidim = 2)

richardbeare/simcor documentation built on May 19, 2019, 4:16 p.m.