Loading

CORRELATE


gts
Since v1.0.0
Available on all platforms

The CORRELATE function allows you to compute correlation between one base Geo Time Series™ and a set of others. By putting the base GTS in the set of others, cross correlation can be computed.

Signature

Examples

// COSINE NEWGTS 'cos' RENAME 1 360 <% 'i' STORE $i NaN NaN NaN $i TORADIANS COS ADDVALUE %> FOR 'cos' STORE $cos [ SWAP bucketizer.last 0 1 0 ] BUCKETIZE LIST-> DROP // SINE NEWGTS 'sin' RENAME 1 360 <% 'i' STORE $i NaN NaN NaN $i 50 + TORADIANS SIN ADDVALUE %> FOR 'sin' STORE $sin [ SWAP bucketizer.last 0 1 0 ] BUCKETIZE // Generate the list of offsets for correlation [ 0 360 <% %> FOR ] // Compute correlation CORRELATE 'correlation' RENAME // put SINE/COSINE on the stack so they can be displayed $cos $sin