0
$\begingroup$

As far as I understood, to compute the cross correlation between two time series, we just consider the values of the time series, i.e, cross correlation ignores the timestamps of each data points in the time series. For example, suppose that we have the following time series:

> ts1
             dateTime value
1 2018-04-27 00:00:00     6
2 2018-04-27 00:00:01     2
3 2018-04-27 00:00:04     3
4 2018-04-27 00:00:05     1
> ts2
             dateTime value
1 2018-04-27 00:00:00     3
2 2018-04-27 00:00:01     8
3 2018-04-27 00:00:02     4
4 2018-04-27 00:00:03     5
5 2018-04-27 00:00:04     2
6 2018-04-27 00:00:05     4

At time lag 0, cross correlation considers the correlation between data points even they do not have same timestamps. For example at time lag 0, cross correlation considers the correlation between the third row of ts1 whose dateTime is 00:00:04 with the third row of of ts2 whose dateTime is 00:00:02. It seems that cross correlation completely ignores the dateTime and only considers the values of data points. But I would like to consider the correlation between the third row of ts1 with the fifth row of ts2. In this case, both of them have same dateTime value which is 00:00:04. Is there a better way to do that rather than imputing missing values for ts1?

$\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.