Updated preprocessor submodule.

Fixes exogenous variables in PAC equation without non optimizing behaviour.
time-shift
Stéphane Adjemian (Charybdis) 2019-03-06 15:39:00 +01:00
parent c0319a9bff
commit 9eb64a0b64
Signed by untrusted user who does not match committer: stepan
GPG Key ID: A6D44CB9C64CE77B
5 changed files with 9 additions and 9 deletions

View File

@ -80,7 +80,7 @@ end
pac.estimate.init(M_, oo_, eqname, params, data, range);
% Check that the error correction term is correct.
if M_.pac.(pacmodl).equations.(eqtag).ec.isendo(1)
if M_.pac.(pacmodl).equations.(eqtag).ec.istarget(1)
error(['\nThe error correction term in PAC equation (%s) is not correct.\nThe ' ...
'error correction term should be the difference between a trend\n' ...
'and the level of the endogenous variable.'], pacmodl);

View File

@ -83,7 +83,7 @@ for e=1:number_of_pac_eq
% Build the vector of PAC parameters (ECM parameter + autoregressive parameters).
pacvalues = DynareModel.params([equations.(eqtag).ec.params; equations.(eqtag).ar.params(1:equations.(eqtag).max_lag)']);
% Get the indices for the stationary/nonstationary variables in the VAR system.
id = find(strcmp(DynareModel.endo_names{equations.(eqtag).ec.vars(~equations.(eqtag).ec.isendo)}, varmodel.list_of_variables_in_companion_var));
id = find(strcmp(DynareModel.endo_names{equations.(eqtag).ec.vars(~equations.(eqtag).ec.istarget)}, varmodel.list_of_variables_in_companion_var));
if isempty(id)
% Find the auxiliary variables if any
ad = find(cell2mat(cellfun(@(x) isauxiliary(x, [8 10]), varmodel.list_of_variables_in_companion_var, 'UniformOutput', false)));
@ -92,11 +92,11 @@ for e=1:number_of_pac_eq
else
for i=1:length(ad)
auxinfo = DynareModel.aux_vars(get_aux_variable_id(varmodel.list_of_variables_in_companion_var{ad(i)}));
if isequal(auxinfo.endo_index, equations.(eqtag).ec.vars(~equations.(eqtag).ec.isendo))
if isequal(auxinfo.endo_index, equations.(eqtag).ec.vars(~equations.(eqtag).ec.istarget))
id = ad(i);
break
end
if isequal(auxinfo.type, 8) && isequal(auxinfo.orig_index, equations.(eqtag).ec.vars(~equations.(eqtag).ec.isendo))
if isequal(auxinfo.type, 8) && isequal(auxinfo.orig_index, equations.(eqtag).ec.vars(~equations.(eqtag).ec.istarget))
id = ad(i);
break
end

@ -1 +1 @@
Subproject commit 34f02a37e375ab464905daae36c8d01a764a83c0
Subproject commit 9963686e726f6cee165e2ff4b755034e05dfa7b1

View File

@ -69,6 +69,6 @@ end;
// Initialize the PAC model (build the Companion VAR representation for the auxiliary model).
pac.initialize('pacman');
if ~isequal(M_.pac.pacman.equations.(M_.pac.pacman.tag_map{strcmp(M_.pac.pacman.tag_map(:,1), 'zpac'),2}).ec.isendo, [false, true])
error('ec.isendo vector is wrong.')
if ~isequal(M_.pac.pacman.equations.(M_.pac.pacman.tag_map{strcmp(M_.pac.pacman.tag_map(:,1), 'zpac'),2}).ec.istarget, [false, true])
error('ec.istarget vector is wrong.')
end

View File

@ -69,6 +69,6 @@ end;
// Initialize the PAC model (build the Companion VAR representation for the auxiliary model).
pac.initialize('pacman');
if ~isequal(M_.pac.pacman.equations.(M_.pac.pacman.tag_map{strcmp(M_.pac.pacman.tag_map(:,1), 'zpac'),2}).ec.isendo, [true, false])
error('ec.isendo vector is wrong.')
if ~isequal(M_.pac.pacman.equations.(M_.pac.pacman.tag_map{strcmp(M_.pac.pacman.tag_map(:,1), 'zpac'),2}).ec.istarget, [true, false])
error('ec.istarget vector is wrong.')
end