Var forecasting
Var forecasting
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 994 times
Re: Var forecasting
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.
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.
Re: Var forecasting
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 632 times
Re: Var forecasting
You apparently don't have comparison data after 2014:12 (or you can't compute forecasts after 2014:12 due to missing data):
so you will get 2 fewer than you're expecting for the longer horizons.
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
Re: Var forecasting
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.
Re: Var forecasting
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
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