2
$\begingroup$

I have data sampled every 5m and I want to estimate the ccf between them, in order to do it I prewhiten the time series x and y and then I apply CCF But lags are not direct related with my sampling frequency, how can I know the relation? for example what is the relation of lag -1000 in minutes?

  row.names    fecha               y      x
1   53542   2012-10-20 00:00:00 1.1055  1.0219
2   53543   2012-10-20 00:05:00 1.1059  1.0164
3   53544   2012-10-20 00:10:00 1.1003  1.0201
4   53545   2012-10-20 00:15:00 1.1015  1.0441
5   53546   2012-10-20 00:20:00 1.1090  1.0224
6   53547   2012-10-20 00:30:00 1.1136  0.9965
7   53548   2012-10-20 00:35:00 1.1140  1.0017
8   53549   2012-10-20 00:40:00 1.1118  1.0379
9   53550   2012-10-20 00:45:00 1.1141  1.0234
10  53551   2012-10-20 00:50:00 1.1128  1.0092
11  53552   2012-10-20 00:55:00 1.1123  1.0232
12  53553   2012-10-20 01:00:00 1.1167  1.0656
13  53554   2012-10-20 01:05:00 1.1195  1.0266
14  53555   2012-10-20 01:10:00 1.1205  1.0142
15  53556   2012-10-20 01:15:00 1.1122  1.0486
16  53557   2012-10-20 01:20:00 1.1168  1.0196
17  53558   2012-10-20 01:30:00 1.1116  1.0070
18  53559   2012-10-20 01:35:00 1.1117  0.9783
19  53560   2012-10-20 01:40:00 1.1170  0.9589
20  53561   2012-10-20 01:45:00 1.1198  1.0070
21  53562   2012-10-20 01:50:00 1.1126  0.9907
22  53563   2012-10-20 01:55:00 1.1190  1.0191
23  53564   2012-10-20 02:00:00 1.1162  0.9625
24  53565   2012-10-20 02:05:00 1.1206  0.9517
25  53566   2012-10-20 02:10:00 1.1237  0.9545
26  53567   2012-10-20 02:15:00 1.1168  0.9894
27  53568   2012-10-20 02:20:00 1.1225  0.9832
28  53569   2012-10-20 02:25:00 1.1239  1.0424
29  53570   2012-10-20 02:30:00 1.1272  1.0140
30  53571   2012-10-20 02:35:00 1.1304  1.0103

library(forecast)
fit <- Arima(x,order=c(2,0,2))
yfiltered <- residuals(Arima(y,model=fit))
ccf(residuals(fit),yfiltered)

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.