Using crosscorr for comparing two time series with different measurements
8 次查看(过去 30 天)
显示 更早的评论
I am new to time series analysis and have a question about the crosscorr function. I have two time series that have measurements over the same time period. However, the measurements are different, i.e. one is number of acoustic tag fish detections and the other is number of fish calls. Yes I am a marine biologist. I am not sure if this means that this is a multivariate comparison or univariate? If it is a univariate then I would imagine that the crosscorr function will give me what I am after: to see if the two time series are correlated. If this is indeed a multivariate, can I still use the crosscorr, or is there a better option. I am trying to figure out if I can trust the crosscorr results from comparing two time series that have different measurements taken at the same time. Much appreciated, Tim
0 个评论
回答(1 个)
Roger Wohlwend
2014-9-5
It is possible to use the function crosscorr. In your case, however, I would not compare the original time series because they do not seem stationary and that would distort the result. So take the first difference of the time series and use crosscorr afterwards
crosscorr(diff(X), diff(Y))
2 个评论
Roger Wohlwend
2014-9-9
Unfortunately the crosscorr function does not provide p-values. You have to use corr or corrcoef for that.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Time Series 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!