Home   >   User Resources   >   Online Help   >   apaCorrels.Fix
 

 

Function index Version 3.0.0

apaCorrels.Fix(Correls, Threshold)

Excel=apaCorrels.Fix(Correls, Threshold)

Result

Fixes an invalid correlation matrix with the spectral method, i.e. eigenvalues below the threshold are raised to the threshold.

Syntax

Correls: correlation matrix

Threshold: optional; minimum eigenvalue which is enforced. 0 returns a positive semi-definite, possibly singular matrix. Negative values return the unchanged correlation matrix; default: 0.0001

Algorithm

The following problems are fixed:

  1. Symmetry of the matrix.

  2. All entries on the main diagonal equal to 1.

  3. Positive semi-definiteness of the matrix.

Remarks

Definiteness and singularity can be controlled with the Threshold parameter. All eigenvalues below Threshold are set to the Threshold value; the larger the Threshold value, the less singular the resulting matrix (but the larger the difference to the initial correlation matrix).