To get negtive lag correlation ,we have Example 7 on
http://ngwww.ucar.edu/ngdoc/ng/ref/ncl/functions/es.html,
mxlag = 9
x_Lead_y = esccr(x,y,mxlag)
y_Lead_x = esccr(y,x,mxlag) ; switch the order of the series
ccr = new ( 2*mxlag+1, float)
ccr(0:mxlag-1) = x_Lead_y(1:mxlag:-1) ; "negative lag", -1 reverses
order
ccr(mxlag:) = y_Lead_x(0:mxlag) ; "positive lag"
In the results,for example, we have ccr(0)=x_Lead_y(9), which corresponds to
9 lag.
But in the web page, it says"Thus in the above example ccr(0:mxlag-1)
corresponds to lags -9,-8,...,-2,-1 and ccr(mxlag:2*mxlag) corresponds to
lags 0,1,2,...,8,9."
Is that means ccr(0)=x_Lead_y(-9)?
I was thinking y_Lead_x(9) coresponds to -9 lag, so it should be:
ccr(0:mxlag-1) = y_Lead_x(1:mxlag:-1) ; "negative lag", -1 reverses
order
ccr(mxlag:) = x_Lead_y(0:mxlag) ; "positive lag"
Then we have ccr(0:mxlag-1) corresponds to lags -9,-8,...,-2,-1 and
ccr(mxlag:2*mxlag) corresponds to lags 0,1,2,...,8,9.
Thank you.
Muhtarjan Osman
_________________________________________________________________
Get ready for school! Find articles, homework help and more in the Back to
School Guide! http://special.msn.com/network/04backtoschool.armx
_______________________________________________
ncl-talk mailing list
ncl-talk AT ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Wed Sep 15 2004 - 07:26:19 MDT