Fixed bug in PAC_EXPECTATION.

The selection of the target variable in the error correction term was still
wrong if the target variable was not an auxiliary variable.
time-shift
Stéphane Adjemia (Scylla) 2018-08-28 19:23:35 +02:00
parent 18a2626543
commit 36388ce28a
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ end
pacvalues = DynareModel.params([pacmodel.ec.params; pacmodel.ar.params(1:pacmodel.max_lag)']);
% Get the indices for the stationary/nonstationary variables in the VAR system.
id = find(strcmp(DynareModel.endo_names{pacmodel.ec.vars(1)}, varmodel.list_of_variables_in_companion_var));
id = find(strcmp(DynareModel.endo_names{pacmodel.ec.vars(2)}, varmodel.list_of_variables_in_companion_var));
if isempty(id)
% Find the auxiliary variables if any