Change the definition of the default baseline.

kalman-mex
Stéphane Adjemian (Argos) 2023-10-26 18:30:43 +02:00
parent b0a84bd6f8
commit 12cca117bc
Signed by: stepan
GPG Key ID: A6D44CB9C64CE77B
1 changed files with 2 additions and 2 deletions

View File

@ -109,8 +109,8 @@ function dcontrib(varargin)
lastperiod = baseline.dates(end); lastperiod = baseline.dates(end);
baseline = baseline{M_.exo_names{:}}; baseline = baseline{M_.exo_names{:}};
else else
% Set default baseline (exogenous variable levels in firstperiod-1) % Set default baseline (exogenous variable levels in firstperiod)
baseline = xvariables(firstperiod-1); baseline = xvariables(firstperiod);
baseline = repmat(baseline.data, lastperiod-firstperiod+1, 1); baseline = repmat(baseline.data, lastperiod-firstperiod+1, 1);
baseline = dseries(baseline, firstperiod, M_.exo_names); baseline = dseries(baseline, firstperiod, M_.exo_names);
end end