Page 1 of 1

Suppress plotting in forecast

PostPosted: Fri Dec 11, 2009 8:16 am
by JuRa
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

Re: Suppress plotting in forecast

PostPosted: Fri Dec 11, 2009 1:59 pm
by AssiaEzzeroug
hi,

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

Best

Re: Suppress plotting in forecast

PostPosted: Mon Dec 14, 2009 9:20 am
by SébastienVillemot
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

Re: Suppress plotting in forecast

PostPosted: Tue Dec 15, 2009 12:12 pm
by JuRa
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

Re: Suppress plotting in forecast

PostPosted: Fri Dec 18, 2009 8:31 am
by SébastienVillemot
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