<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

ToBeReviewed/STATISTICS/

a_timecorrelate.pro

Routine summary

result = TimeAuto_Cov(X, M, nT, Double=Double, zero2nan=zero2nan)

NAME: A_TIMECORRELATE PURPOSE: Same function as A_CORRELATE but accept array (until 4 dimension) for input and do the autocorrelation or the autocovariance along the time dimension which must be the last one of the input array.

result = A_TimeCorrelate(X, Lag, COVARIANCE=COVARIANCE, DOUBLE=DOUBLE)

topTimeAuto_Cov

result = TimeAuto_Cov(X, M, nT, Double=Double, zero2nan=zero2nan)

NAME: A_TIMECORRELATE PURPOSE: Same function as A_CORRELATE but accept array (until 4 dimension) for input and do the autocorrelation or the autocovariance along the time dimension which must be the last one of the input array. This function computes the autocorrelation Px(L) or autocovariance Rx(L) of a sample population X as a function of the lag (L). CATEGORY: Statistics. CALLING SEQUENCE: Result = a_timecorrelate(X, Lag) INPUTS: X: an Array which last dimension is the time dimension os size n. LAG: A scalar or n-element vector, in the interval [-(n-2), (n-2)], of type integer that specifies the absolute distance(s) between indexed elements of X. KEYWORD PARAMETERS: COVARIANCE: If set to a non-zero value, the sample autocovariance is computed. DOUBLE: If set to a non-zero value, computations are done in double precision arithmetic. EXAMPLE 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 lag = [-3, 0, 1, 3, 4, 8] result = a_correlate(x, lag) The result should be: [0.0146185, 1.00000, 0.810879, 0.0146185, -0.325279, -0.151684] PROCEDURE: n-L-1 sigma (X[k]-Xmean)(X[k+L]-Xmean) k=0 correlation(X,L)=---------------------------------------- n-1 sigma (X[k]-Xmean)^2 k=0 n-L-1 sigma (X[k]-Xmean)(X[k+L]-Xmean) k=0 covariance(X,L)=------------------------------------------- n Where Xmean is the Time mean of the sample population x=(x[t=0],x[t=1],...,x[t=n-1]) REFERENCE: INTRODUCTION TO STATISTICAL TIME SERIES Wayne A. Fuller ISBN 0-471-28715-6 MODIFICATION HISTORY:

Parameters

X       

M       

nT       

Keywords

Double       

zero2nan       

topA_TimeCorrelate

result = A_TimeCorrelate(X, Lag, COVARIANCE=COVARIANCE, DOUBLE=DOUBLE)

Parameters

X       

Lag       

Keywords

COVARIANCE       

DOUBLE       

Produced by IDLdoc 2.0.