Fix var expectation weights when auxiliary model has a constant.

Increment index variables_id_in_var if constant is present in VAR model (first position in the Companion representation)..
pac-components
Stéphane Adjemian (Ryûk) 2021-09-06 23:46:46 +02:00
parent d41306f0c1
commit d440b70820
Signed by: stepan
GPG Key ID: 295C1FE89E17EB3C
1 changed files with 5 additions and 1 deletions

View File

@ -108,6 +108,10 @@ for i = 1:m
end
end
if isfield(auxmodel, 'isconstant') && auxmodel.isconstant
variables_id_in_var = variables_id_in_var+1;
end
% Get the horizon parameter.
horizon = varexpectationmodel.horizon;
@ -214,4 +218,4 @@ if isequal(varexpectationmodel.auxiliary_model_type, 'var')
end
else
DynareModel.params(varexpectationmodel.param_indices) = parameters;
end
end