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 Center および File ExchangeDescriptive Statistics についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by