Move definition of γ (share of optimizing agents) up.

(cherry picked from commit 405110a9e2e7dbcd41d0aa406986e016aa3a0dff)
pac-components
Stéphane Adjemian (Ryûk) 2021-11-04 10:36:25 +01:00
parent 39df328319
commit 125ba21f29
Signed by: stepan
GPG Key ID: 295C1FE89E17EB3C
1 changed files with 6 additions and 5 deletions

View File

@ -133,6 +133,12 @@ for e=1:number_of_pac_eq
else
growth_flag = false;
end
% Do we have rule of thumb agents? γ is the share of optimizing agents.
if isfield(equations.(eqtag), 'non_optimizing_behaviour')
gamma = DynareModel.params(equations.(eqtag).share_of_optimizing_agents_index);
else
gamma = 1.0;
end
% Get h0 and h1 vectors (plus the parameter for the growth neutrality correction).
if growth_flag
[h0, h1, growthneutrality] = hVectors([pacvalues; beta], varcalib.CompanionMatrix, ids, idns, pacmodel.auxiliary_model_type);
@ -175,11 +181,6 @@ for e=1:number_of_pac_eq
end
end
% Update the parameter related to the growth neutrality correction.
if isfield(equations.(eqtag), 'non_optimizing_behaviour')
gamma = DynareModel.params(equations.(eqtag).share_of_optimizing_agents_index);
else
gamma = 1.0;
end
if growth_flag
% Growth neutrality as returned by hVector is valid iff
% there is no exogenous variables in the model and in the