@cor |

Computes the correlation between two vectors, or between the columns of a matrix.

Syntax: @cor(x, y)

x: vector, rowvector, or series

y: vector, rowvector, or series

Return: scalar

Syntax: @cor(m)

m: matrix object or group

Return: sym

For series and group calculations, EViews will use the current workfile sample.

Examples

If used with two vector or series objects, @cor returns the correlation between the two vectors or series.

scalar sc1 = @cor(v1, v2)

If used with a matrix object or group, @cor calculates the correlation matrix between the columns of the matrix object or the series in the group object.

sym s1 = @cor(mat1)

Cross-references