Skip to content
Prev 5649 / 7420 Next

correlating three time-series in R

You can pass the columns to ccf() directly:

df <- data.frame(x=rnorm(6), y=rnorm(6))
ccf(df$x, df$y)
print(ccf(df$x, df$y))

You should probably also check the time series task view: 
<https://cran.r-project.org/web/views/TimeSeries.html>, in particular 
the zoo package, to see what can be done with irregular time series.

But with 6 data points I'd be surprised if you have the power to detect 
anything that doesn't jump out when you simply plot the data.

Bob
On 26/07/17 11:07, Tania Bird wrote: