Correl() returns the aggregated correlation coefficient for a series of coordinates represented by paired numbers in x-expression and y-expression iterated over a number of records as defined by a group by clause.
Return data type: numeric
|value1, value2||The expressions or fields containing the two sample sets for which the correlation coefficient is to be measured.|
Text values, NULL values and missing values in any or both pieces of a data-pair result in the entire data-pair being disregarded.
Examples and results:
Add the example script to your document and run it. Then add, at least, the fields listed in the results column to a sheet in your document to see the result.
Load *, 1 as Grp;
LOAD * inline [
] (delimiter is '|');
Correl(Age,Salary) as Correl_Salary Resident Salary Group By Grp;
|Correl_Salary = 0.9270611|