lead-lag correlations

Prince K. Xavier xavier at CAOS.IISC.ERNET.IN
Fri Feb 18 10:44:03 EST 2005


Hello Massimo,

the following script segment works well for me. Please give a try and let
me know in case of problems.

*----------------------------------------
ntime=2806  % Total length of series
nlags = 30  %  number of days lead/lag. the calculation starts from
t-30 to t+30
var1 = pt   % variable 1
var2 = u    % variable 2 (this could be a field as well)

ll = -nlags
while (ll<=nlags)
'set t 1'
'd tcorr('var1', 'var2'(t+'ll'),t=1,t='ntime')'
ll = ll+1
endwhile
*--------------------------------------------

good luck
prince

On Thu, 17 Feb 2005, Massimo Bollasina wrote:

> Hi All,
>
> is there any GRADS script to compute lead-lag correlations between two
> time series?
>
> Thank you in advance. Regards,
>
> Massimo
>
> --
> Massimo Bollasina
> Climate Research Division/Scripps Institution of Oceanography
> UCSD - La Jolla, CA 92093-0224
> email: mbollasina at ucsd.edu
> phone:   858-534-4157
> fax:  858-534-8561
> www: http://ecpc.ucsd.edu/
>

--
Prince K XAVIER
Centre for Atmospheric and Oceanic Sciences
Indian Institute of Science
Bangalore - 560 012
INDIA
http://caos.iisc.ernet.in/hpg/students/prince.html
__________________________________________________
Phone No.
+91-80-2293 2505(Office)
+91 98808 19172 (Mobile)



More information about the gradsusr mailing list