Click or drag to resize

CORRELATION function

Return a handle to a correlation object.

Description

Create a handle to a correlation object using an array of vectors.

An n×n correlation matrix is determined by n unit vectors. The i,j entry is the inner (dot) product of the i-th and j-th unit vectors.

Since each vector is a unit vector only n - 1 components need to be specified. If the sum of their squares is greater than 1 an error will be returned. We can also assume the i-th vector has nonzero entries only in the first i components.

There are two ways to enter the correlations: as a lower triangular matrix or as a packed matrix. The lower triangular matrix has the form:

rho(1,1), 0,        0,..., 0 
rho(2,1), rho(2,2), 0,..., 0 
...
rho(n,1), rho(n,2),   ..., rho(n,n-1)
The packed matrix is a one-dimensional array of the above with the 0 entries removed.

Syntax

CORRELATION(rho, layout)

  • rho is an array of vectors without their last component.

  • layout is either CORRELATION_LOWER(), or CORRELATION_PACKED()