[R] Finding the max correlation coefficient value using CCF function
vikrant
vikrant.shimpi at tcs.com
Wed Apr 28 05:42:42 CEST 2010
Hi All,
Suppose I have 2 time series
a = 1:20
b = 5:15
and I am finding the cross correlation between these two time series using
CCF function.
c = ccf(a,b)
print(c)
Autocorrelations of series ‘X’, by lag
-7 -6 -5 -4 -3 -2 -1 0 1 2 3
4 5 6 7
-0.358 -0.255 -0.110 0.070 0.278 0.507 0.750 1.000 0.750 0.507 0.278
0.070 -0.110 -0.255 -0.358
it will give me the correlation coefficient (r) with corrsponding lags.
My Question is how to find the value of maximum correlation coefficient
with the corrsponding lag.
here in this case its r = 0.75 with lag = 0
how to get this valus in a vector or variable?
--
View this message in context: http://r.789695.n4.nabble.com/Finding-the-max-correlation-coefficient-value-using-CCF-function-tp2068580p2068580.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list