Thursday, October 1, 2020

cross correlation between two time series

correlation is a linear measure of similarity between two signals. Cross-correlation is somewhat a generalization of the correlation measure as it takes into account the lag of one signal relative to the other. If lag == 0, then correlation = cross-correlation. Cross-correlation is particularly important to assess the causal relationship between two signals in time. If you suspect that there is a non-linear relationship between the two signals, then you should consider measures such as mutual information and partial mutual information, which are the information-theoretic equivalent of correlation and cross-correlation. 


You can refer to the comment above for information on how to compute correlation and cross-correlation. Check this paper instead (and references therein) for details on mutual information and partial mutual information http://www.sciencedirect.com/science/article/pii/S0022169400003462 https://youtu.be/6ao9-39zw40 https://youtu.be/L6YJqhbsuFY  

 ccf in R Ziwei Ma:
I checked the ccf function which calculates the correlation for x_{t+h} and y_t, so in our case, the ccf( dailyCases (x), dew_points (y) ) report they are positively relative, and the peak happen at arround 7 which says dailyCases lags dew_points or dew_points predict dailyCases in 7 days. 

The following website have more details there. https://online.stat.psu.edu/stat510/lesson/8/8.2

No comments:

Post a Comment