The A_CORRELATE function computes the autocorrelation Px ( L ) or autocovariance Rx ( L )of a sample population X as a function of the lag L .
where ` x is the mean of the sample population x = ( x 0 , x 1 , x 2 , ... , x N-1 ).
This routine is written in the IDL language. Its source code can be found in the file
a_correlate.pro
in the
lib
subdirectory of the IDL distribution.
Define an n -element sample population.
X = [3.73, 3.67, 3.77, 3.83, 4.67, 5.87, 6.70, 6.97, 6.40, 5.57]
Compute the autocorrelation of X for LAG = -3, 0, 1, 3, 4, 8
CORRELATE , C_CORRELATE , M_CORRELATE , P_CORRELATE , R_CORRELATE