Acknowldge time_shift option in print_expectations.

Lagged information set was missing in the evaluation routine.
pac-components
Stéphane Adjemian (Charybdis) 2021-10-24 19:29:31 +02:00
parent 7f0ba33d5a
commit a5ccd0ae90
Signed by: stepan
GPG Key ID: 295C1FE89E17EB3C
1 changed files with 6 additions and 2 deletions

View File

@ -253,6 +253,10 @@ if isequal(expectationmodel.auxiliary_model_type, 'trend_component')
maxlag = maxlag+1;
end
if isequal(expectationmodelkind, 'var')
timeindices = (0:(maxlag-1))+abs(expectationmodel.time_shift);
end
if isequal(expectationmodelkind, 'var') && isequal(expectationmodel.auxiliary_model_type, 'var')
id = id+1;
expression = sprintf('%1.16f', M_.params(expectationmodel.param_indices(id)));
@ -304,8 +308,8 @@ for i=1:maxlag
end
switch expectationmodelkind
case 'var'
if i>1
variable = sprintf('dbase.%s(-%d)', variable, i-1);
if timeindices(i)>0
variable = sprintf('dbase.%s(-%d)', variable, timeindices(i));
else
variable = sprintf('dbase.%s', variable);
end