MATLAB Answers

0

Long-horizon predictive regressions

Asked by Stefano Döring on 10 Apr 2018
Latest activity Answered by Pawel Jastrzebski on 10 Apr 2018
Hey guys!
My MatLab skills are very very basic and I need your help, because i can't find the right answer here.
So for an assignment I have to compute some long-horizon predictive regressions. Univariate, bivariate and multiple.
I collected all my monthly data (From 1963:07 to 2016:12) for the dependend and the independend variables and my task is now to compute monthly long-horizon predictive regressions with the forecasting horizons 1,6,9,12,24,36 and 48 months. I need the R² and t-statistics for each of those horizons.
So i only know how to do basic linear regressions and I am completly lost now. I have no idea how to compute those different forecasting horizons.
So does anyone know the right solution to my problem or could help me?
Thanks in advance!

  0 Comments

Sign in to comment.

1 Answer

Answer by Pawel Jastrzebski on 10 Apr 2018
 Accepted Answer

The R value calculation is available in Matlab:
  • <https://uk.mathworks.com/help/matlab/ref/corrcoef.html R coefficient>As for the t-test, you'll need a Statistical Toolbox for the off-the box function. However, if you read up on the t-test, you'll be able to write up your own t-test function in Matlab, as it's not very complicated:
  • t-test doc
I'll bet you've got Excel installed on your computer. If so, go to the following tab and find the help file for the t-test analysis. In there you'll find the formulas for all different types of the t-test. Though,this Data Analysis tab is sometimes disabled. But you can easily enable it in the add-on section of the settings - 3 seconds with google and you'll find the way to enable it. It's actually recommended that you do it this way as there are different types of the t-test and you need to understand the differences and choose the right one for your application.

  0 Comments

Sign in to comment.