Econometrics Toolbox Cross Correlation, how to use?

조회 수: 4 (최근 30일)
Birtan Derin
Birtan Derin 2018년 5월 11일
답변: Hang Qian 2018년 6월 7일
Hello everyone,
I'm kind of a beginner with the statistics tools, and I don't know how to interpret the results from the crosscorr function from Econometrics toolbox. Basically I have variables x1, and x2, and I typed crosscorr(x1,x2), which gave me a chart. I am trying to understand which variable has a lag or a lead against the other variable.
Now, in the plot, let's say the correlation is highest at lag = 5. How do you interpret this result? Does that mean x1 lags behind x2, or vice versa. In addition, my time series is from newest to oldest, but crosscorr function assumes the most recent date is the last row. How would that make a difference to the results?

채택된 답변

Hang Qian
Hang Qian 2018년 6월 7일
Hi Mehmet,
If your time series is sorted from newest to oldest, the first thing that you may want to do is to revert the order of the series, like
Z = Y(end:-1:1)
All functions in the Econometrics Toolbox assumes that the data are organized from oldest to newest, with the last observation being the most recent one.
Regarding interpretation of the crosscorr results, when the correlation is highest at lag = 5, I think the second series has a lead? You may want to see the definition of cross correlation, which is shown at the bottom of the documentation page under the section “ More about - Cross-Correlation Function”.
Best
Hang Qian

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Resampling Techniques에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by