Using crosscorr for comparing two time series with different measurements

12 views (last 30 days)
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

Answers (1)

Roger Wohlwend
Roger Wohlwend on 5 Sep 2014
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 Comments
Timothy
Timothy on 5 Sep 2014
Thanks Roger. I forgot to mention that I was using first differencing as you mentioned here to mitigate autocorrelation effects. Thanks for boosting my confidence in the methodology. Are there any specific ways to calculate p-values for each lag? I have been looking at other topics on that issue, but have been unable to find anything concrete.
Roger Wohlwend
Roger Wohlwend on 9 Sep 2014
Unfortunately the crosscorr function does not provide p-values. You have to use corr or corrcoef for that.

Sign in to comment.

Categories

Find more on Descriptive Statistics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!