From 13bd1622e256311de9bb1954d8ae6af96b8a1687 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Tue, 15 Oct 2013 13:31:11 +0200 Subject: [PATCH] Fix variable name and document saving of conditional forecasts --- doc/dynare.texi | 42 ++++++++++++++++++++++++++++++++++++++++++ matlab/imcforecast.m | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/doc/dynare.texi b/doc/dynare.texi index 0382dcf78..4cc43540c 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -5580,6 +5580,48 @@ DSGE model, @code{simulation_type} has to be set equal to @code{deterministic}. @end table +@outputhead + +The results are not stored in the @code{oo_} structure but in a separate structure @code{forecasts} saved to the harddisk into a file called @code{conditional_forecasts.mat}. + +@defvr {MATLAB/Octave variable} forecasts.cond +Variable set by the @code{conditional_forecast} command. It stores the conditional forecasts. Fields are @code{periods+1} by 1 vectors storing the steady state (time 0) and the subsequent @code{periods} forecasts periods. Fields are of the form: +@example +@code{forecasts.cond.@var{FORECAST_MOMENT}.@var{VARIABLE_NAME}} +@end example +where @var{FORECAST_MOMENT} is one of the following: + +@table @code + +@item Mean +Mean of the conditional forecast distribution. + +@item ci +Confidence interval of the conditional forecast distribution. The size corresponds to @code{conf_sig}. +@end table + +@end defvr + +@defvr {MATLAB/Octave variable} forecasts.uncond +Variable set by the @code{conditional_forecast} command. It stores the unconditional forecasts. Fields are of the form: +@example +@code{forecasts.uncond.@var{FORECAST_MOMENT}.@var{VARIABLE_NAME}} +@end example +@end defvr + +@defvr {MATLAB/Octave variable} forecasts.instruments +Variable set by the @code{conditional_forecast} command. Stores the names of the exogenous instruments. +@end defvr + +@defvr {MATLAB/Octave variable} forecasts.controlled_variables +Variable set by the @code{conditional_forecast} command. Stores the position of the constrained endogenous variables in declaration order. +@end defvr + +@defvr {MATLAB/Octave variable} forecasts.graphs +Variable set by the @code{conditional_forecast} command. Stores the information for generating the conditional forecast plots. +@end defvr + + @examplehead @example diff --git a/matlab/imcforecast.m b/matlab/imcforecast.m index 6592c9cc0..de69d7bcd 100644 --- a/matlab/imcforecast.m +++ b/matlab/imcforecast.m @@ -205,7 +205,7 @@ tt = (1-options_cond_fcst.conf_sig)/2; t1 = round(options_cond_fcst.replic*tt); t2 = round(options_cond_fcst.replic*(1-tt)); -forecasts.controled_variables = constrained_vars; +forecasts.controlled_variables = constrained_vars; forecasts.instruments = options_cond_fcst.controlled_varexo; for i = 1:EndoSize