2 time series, which looked like highly correlated. I want to prove it with CCF.
CCF stands for cross-correlation. In this case, I used R ccf (cross-correlation) function.
With direct CCF:
fe <- c(15,24,36,40,50,68,71,86,88,81,84,85,102,120,124,124,128,134)
ma <- c(317,331,347,353,368,382,395,411,417,418,454,460,469,480,493,503,516,522)
female <- ts(fe, frequency = 1, start=c(1950))
male <- ts(ma, frequency = 1, start=c(1950))
ccf(male, female)
Am I right here, they are highly correlated with zero lags?
With differencing:
ccf(diff(male), diff(female))
It shows no correlation.
What is the best way to find out the correlations between two time series?
p.s. This question is specifically related to CCF, from time series’ point of view and trying to understand if there's a lagging factor, not Pearson correlation.
Thannk you.