Suppress plotting in forecast

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Suppress plotting in forecast

Postby JuRa » Fri Dec 11, 2009 8:16 am

I am not apple to suppress plotting in version 4 in the same fashion than in version 3.

"forecast (periods = 200) x; "

does not work. I get the error message
??? Attempted to access var_yf(:,2); index out of bounds because
size(var_yf)=[200,1].

Error in ==> simultxdet at 150
int_width(:,i) = fact*sqrt(var_yf(:,i))';

Error in ==> forecast at 120
[yf,int_width] = simultxdet(y0,ex,oo_.exo_det_simul,...

Error in ==> BL_APADJ_4 at 1120
info = forecast(var_list_,'simul');

Error in ==> dynare at 102
evalin('base',fname) ;

I have 156 variables, so I realy do not wish to plot them all every time I solve the model. What should I do?

Cheers,

Jukka
JuRa
 
Posts: 6
Joined: Tue May 06, 2008 7:43 am

Re: Suppress plotting in forecast

Postby AssiaEzzeroug » Fri Dec 11, 2009 1:59 pm

hi,

maybe you cant plot this variable because it has a unit root. Could u post ur mod-file plz?

Best
AssiaEzzeroug
 
Posts: 83
Joined: Tue Nov 24, 2009 3:48 pm

Re: Suppress plotting in forecast

Postby SébastienVillemot » Mon Dec 14, 2009 9:20 am

Hi,

This is a bug in Dynare, thanks for reporting this. It will be fixed in the next release of Dynare.

If you want to fix it on your Dynare installation, edit the file matlab/simultxdet.m, and, by the end of the file, replace:
Code: Select all
  for i=1:endo_nbr
    int_width(:,i) = fact*sqrt(var_yf(:,i));
  end

by:
Code: Select all
  for i=1:nvar
    int_width(:,i) = fact*sqrt(var_yf(:,i));
  end
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Suppress plotting in forecast

Postby JuRa » Tue Dec 15, 2009 12:12 pm

Hi,

thanks for the reply. Your change almost did the trick. Now I'm apple to plot only one variable like I wanted, but at the same time I get forecasts only for one variable. I wish to collect the forecast from the stucture oo_.forecast.Mean for all the endogenous variables I have in the model and suppress the plotting.

I upload the model code I use for you to test.

Cheers,

Jukka
BL_APADJ_4.mod
(25.04 KiB) Downloaded 174 times
JuRa
 
Posts: 6
Joined: Tue May 06, 2008 7:43 am

Re: Suppress plotting in forecast

Postby SébastienVillemot » Fri Dec 18, 2009 8:31 am

Hi,

For the moment the "forecast" has no option to suppress the graphics. So the trick is to add the "nograph" option to stoch_simul. It will look like:
Code: Select all
stoch_simul(irf=0, order=1, nograph);
forecast(periods=200);


That should do what you want.

Also note that I have added the "nograph" option to "forecast" in the unstable version of Dynare. This should therefore become available in the upcoming Dynare 4.1 release.

Best
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 15 guests