BVAR Forecasting evaluation with @runtheil

Questions and discussions on Vector Autoregressions
mob7
Posts: 9
Joined: Tue May 03, 2011 9:40 am

BVAR Forecasting evaluation with @runtheil

Unread post by mob7 »

Hi,

I am trying to evaluate forecasts from a BVAR for multiple alternative values for the tightness parameters. A hypothetical example of what I'm doing derived from the canmodel.rpf is below:

Code: Select all

procedure runtheil
option  choice    type        1    symmetric  general
option  rect      matrix
option  vector    mvector
option  real      tightness  .1
option  real      other      .5
option  string    window
*
local   integer  time
*
system(model=canmodel)                                        ;*<<<<<<<
variables logcangdp logcandefl logcanm1 logexrate can3mthpcp logusagdp ;*<<<<<<<<
lags 1 to 4                                                   ;*<<<<<<<
det constant
specify(tightness=tightness,type=type,matrix=matrix,mvector=mvector)  other
end(system)
*
theil(model=canmodel,setup,steps=12,to=2006:4)                ;*<<<<<<<
estimate(noprint) * 1998:4                                    ;*<<<<<<<
theil
do time=1999:1,2006:3                                         ;*<<<<<<<
   kalman
   theil
end do time
theil(dump,window=window)
end
*
***********************************************************************
comp draw=10
do j = 1,draw
@runtheil(tightness=j,other=.001,window="Tight(j)")
end do j

My question is whether it is possible to extract the Theil's U for each forecast step in the @runtheil, or can it just be sent to an output window? I would ultimately have numerous tightness combinations that I would hope to evaluate and if this output was in memory and not just printed it would be helpful.

Thanks!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: BVAR Forecasting evaluation with @runtheil

Unread post by TomDoan »

Sure. After you do the THEIL(DUMP), %THEIL has the values of the forecast statistics. You'll have to pull out the ones you want and save them somewhere else so they don't get overwritten by the next setting. You can do that after the @RUNTHEIL execution inside your final loop.

Note, however, that TIGHTNESS=1 to 10 isn't going to be very interesting. All of those are quite loose and so you won't see much difference among them.
Post Reply