Var forecasting

Questions and discussions on Vector Autoregressions
sanjeev
Posts: 191
Joined: Mon Jun 18, 2012 6:51 am

Var forecasting

Unread post by sanjeev »

I am using the runtheil program for forecasts. However when I am generating say 8 forecasts the program is displaying the use of 9 observations in the calculation of the summary statistics of the forecasts. I am attaching the program code will be grateful for help.
Attachments
rats2ganesh.RPF
code for forecasting
(1.03 KiB) Downloaded 996 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Var forecasting

Unread post by TomDoan »

The syntax on this is wrong:

theil(setup,model=bvar) 1 12 2013:05,2015:02

I assume that should be just 2015:2 (the last period of data) at the end.
sanjeev
Posts: 191
Joined: Mon Jun 18, 2012 6:51 am

Re: Var forecasting

Unread post by sanjeev »

I have made the changes as suggested . However the results are the same. The number of observations in the summary statistics varies from the number of forecasts generated. Maybe if I send the data file one might see it clearly. waiting for your suggestion.
Attachments
newdatawithchangedvols1.xls
(86.5 KiB) Downloaded 634 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Var forecasting

Unread post by TomDoan »

You apparently don't have comparison data after 2014:12 (or you can't compute forecasts after 2014:12 due to missing data):

Code: Select all

2014:12 4.135309594 8.915746146 0.232811676 -1.96379672
         4.139158578 8.264320000 0.201959135 -1.96772947
 2015:01     NA          NA          NA          NA
             NA          NA          NA          NA
 2015:02     NA          NA          NA          NA
             NA          NA          NA          NA
so you will get 2 fewer than you're expecting for the longer horizons.
sanjeev
Posts: 191
Joined: Mon Jun 18, 2012 6:51 am

Re: Var forecasting

Unread post by sanjeev »

Yes that is correct but even if i change my forecast time period so that it ends at 2014:12 the summary statistics are showing me one observation more than the forecasts as calculated. That is while 20 one period ahead forecasts are calculated, the number of observations in the summary statistics of forecasts is shown as 21.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Var forecasting

Unread post by TomDoan »

You probably didn't count that extra THEIL instruction after the ESTIMATE:

theil(setup,model=bvar) 1 12 2013:05,2015:02
estimate(noprint) * 2013:04
theil
do time=2013:05;2015:02
Kalman
theil(print) time
end do time
Post Reply