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

ToBeReviewed/STATISTICS/

a_timecorrelate.pro

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).

Routine summary

result = timeauto_cov(x, m, nt, DOUBLE=DOUBLE, ZERO2NAN=ZERO2NAN)

result = a_timecorrelate(x, lag, COVARIANCE=COVARIANCE, DOUBLE=DOUBLE)

toptimeauto_cov Statistics

result = timeauto_cov(x, m, nt, DOUBLE=DOUBLE, ZERO2NAN=ZERO2NAN)

Parameters

x        in required type: array

An array which last dimension is the time dimension so size n.

m       

nt       

Keywords

DOUBLE       

If set to a non-zero value, computations are done in double precision arithmetic.

ZERO2NAN       

Examples

Version history

Version

$Id: a_timecorrelate.pro 262 2007-08-21 14:19:32Z pinsard $

History

Statistics

McCabe cyclic 8
McCabe essential 1
McCabe modular design 1

topa_timecorrelate Statistics

result = a_timecorrelate(x, lag, COVARIANCE=COVARIANCE, DOUBLE=DOUBLE)

Parameters

x        in required type: array

An array which last dimension is the time dimension so size n.

lag        in required type: scalar or vector

A scalar or n-elements vector, in the interval [-(n-2),(n-2)], of type integer that specifies the absolute distance(s) between indexed elements of X.

Keywords

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.

Examples

Define an n-elements sample population. IDL> 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 IDL> lag = [-3, 0, 1, 3, 4, 8] IDL> result = a_correlate(x, lag) The result should be: [0.0146185, 1.00000, 0.810879, 0.0146185, -0.325279, -0.151684]

Version history

Version

$Id: a_timecorrelate.pro 262 2007-08-21 14:19:32Z pinsard $

History

24/2/2000 Sebastien Masson (smasson@lodyc.jussieu.fr) Based on the A_CORRELATE procedure of IDL INTRODUCTION TO STATISTICAL TIME SERIES Wayne A. Fuller ISBN 0-471-28715-6

Statistics

McCabe cyclic 13
McCabe essential 1
McCabe modular design 1
Produced by IDLdoc 2.0.