Re: [R] ccf function

2010-07-14 Thread vikrant
Hi Megan, Answer for you third question. This function will return the maximum CCF value along with corresponding lag value. Input to this function are a and b which are nothing but two time series. Find_Max_CCF<- function(a,b) { d <- ccf(a, b, plot = FALSE) cor = d$acf[,,1] lag = d$lag[,,

[R] ccf function

2010-07-13 Thread Megan Moreau
Hello, I am a very new R user and not a statistician so please excuse any over explanation, I'm just trying to be as clear as possible. I have performed a cross correlation of two time series (my columns) in a single data setusing: ccf(ts(A[rows,columnX]),(A[rows,columnY]), lag=NULL, type="cor