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 app and run it. To see the result, add the fields listed in the results column to a sheet in your app.
Load *, 1 as Grp;
LOAD * inline [
] (delimiter is '|');
Correl(Age,Salary) as Correl_Salary Resident Salary Group By Grp;
|In a table with the dimension Correl_Salary, the result of the Correl() calculation in the data load script will be shown: 0.9270611|