Fix behavior of smoother2histval
-
The smootherwill only store theM_.orig_endo_nbrvariables for Bayesian estimation. So callingsmoother2histvalwill "forget" about the auxiliary variables we introduce. Thus, by convention they will be initialized at their steady state - which differs from the description in the manual that itwill use these values to construct initial conditions (as if they had been manually entered through histval).
In case of
histval, the non-mentioned variables would be set to 0.In contrast, for ML it will work.
-
@MichelJuillard In b70d99d1 the code was refactored. But the treatment of lags seems inconsistent. Initialization assumes one lag via M_.endo_histval = repmat(oo_.steady_state, 1, M_.maximum_lag);but later we have
k = M_.orig_maximum_endo_lag - M_.maximum_endo_lag + 1: M_.orig_maximum_lag; v = s((period-M_.orig_maximum_endo_lag+1):period);% + steady_state(j); M_.endo_histval(j, :) = v(k);which relies on
orig_maximum_endo_lagand may have more than one lag. Using grep, it seems most other files expectM_.endo_histvalto be a vector not a matrix. -
Depending on whether output is to a file or M_.endo_histval, non-requested variables will be set to 0 or the steady state. We must be consistent.