From cb9a0ef064eacac1cc2278363d8989df4b432bcf Mon Sep 17 00:00:00 2001 From: Michel Juillard Date: Sat, 18 Jul 2015 07:13:14 +0200 Subject: [PATCH] adding provision for histval in conditional_forecasts --- matlab/imcforecast.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/matlab/imcforecast.m b/matlab/imcforecast.m index 17587ade1..5b86d16e1 100644 --- a/matlab/imcforecast.m +++ b/matlab/imcforecast.m @@ -118,7 +118,11 @@ if estimated_model trend = trend(oo_.dr.order_var,:); InitState(:,1) = atT(:,end); else - InitState(:,1) = zeros(M_.endo_nbr,1); + if isempty(M_.endo_histval) + InitState(:,1) = zeros(M_.endo_nbr,1); + else + InitState(:,1) = M_.endo_histval(oo_.dr.order_var) - oo_.steady_state(oo_.dr.order_var); + end trend = repmat(oo_.steady_state(oo_.dr.order_var),1,options_cond_fcst.periods+1); graph_title='Calibration'; end