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

ToBeReviewed/STATISTICS/

c_timecorrelate.pro

This function computes the "time cross correlation" Pxy(L) or the "time cross covariance" between 2 arrays (this is some kind of C_CORRELATE but for multidimensional arrays) as a function of the lag (L).

Routine summary

result = timecross_cov(xd, yd, m, nt, ndim, DOUBLE=DOUBLE, ZERO2NAN=ZERO2NAN)

result = c_timecorrelate(x, y, lag, COVARIANCE=COVARIANCE, DOUBLE=DOUBLE)

toptimecross_cov Statistics

result = timecross_cov(xd, yd, m, nt, ndim, DOUBLE=DOUBLE, ZERO2NAN=ZERO2NAN)

Parameters

xd       

yd       

m       

nt       

ndim       

Keywords

DOUBLE       

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

ZERO2NAN       

Examples

Version history

Version

$Id: c_timecorrelate.pro 327 2007-12-13 16:22:35Z pinsard $

History

Statistics

McCabe cyclic 7
McCabe essential 1
McCabe modular design 1

topc_timecorrelate Statistics

result = c_timecorrelate(x, y, lag, COVARIANCE=COVARIANCE, DOUBLE=DOUBLE)

Parameters

x        in required type: array

An array which last dimension is the time dimension of size n, float or double.

y        in required type: array

An array which last dimension is the time dimension of size n, float or double.

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 cross covariance is computed.

DOUBLE       

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

Examples

Define two n-elements sample populations. IDL> x = [3.73, 3.67, 3.77, 3.83, 4.67, 5.87, 6.70, 6.97, 6.40, 5.57] IDL> y = [2.31, 2.76, 3.02, 3.13, 3.72, 3.88, 3.97, 4.39, 4.34, 3.95] Compute the cross correlation of X and Y for LAG = -5, 0, 1, 5, 6, 7 IDL> lag = [-5, 0, 1, 5, 6, 7] IDL> result = c_timecorrelate(x, y, lag) The result should be: [-0.428246, 0.914755, 0.674547, -0.405140, -0.403100, -0.339685]

Version history

Version

$Id: c_timecorrelate.pro 327 2007-12-13 16:22:35Z pinsard $

History

- 01/03/2000 Sebastien Masson (smasson@lodyc.jussieu.fr) Based on the C_CORRELATE procedure of IDL - August 2003 Sebastien Masson update according to the update made in C_CORRELATE by W. Biagiotti and available in IDL 5.5 INTRODUCTION TO STATISTICAL TIME SERIES Wayne A. Fuller ISBN 0-471-28715-6

Statistics

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