Fixed lag number in PAC equation.

The number of autoregressive parameters has to be equal to the number of lags
in the PAC equation.
time-shift
Stéphane Adjemian(Charybdis) 2018-08-13 12:41:37 +02:00
parent f70712d086
commit 702e6d4cc7
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ if ~isfield(varcalib, 'CompanionMatrix') || any(isnan(varcalib.CompanionMatrix(:
end
% Build the vector of PAC parameters (ECM parameter + autoregressive parameters).
pacvalues = DynareModel.params([pacmodel.ec.params; pacmodel.ar.params(:)]);
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));