【Correlation】
[code]inputs:Indep( numericseries ),
Dep( numericseries ),
Len( numericsimple) ;
variables:
var0( 0 ) ;
if Len > 0 then
begin
var0 = 0 ;
for Value1 = 0 to Len - 1
begin
condition1 = ( ( Indep >= Indep[1] and Dep >= Dep[1] )
or ( Indep < Indep[1] and Dep < Dep[1] ) )[Value1];
if condition1
then
var0 = var0 + 1 ;
end ;
Correlation = 2 * var0 / Len - 1 ;
end
else
Correlation = -2 ;
[/code]
页:
[1]