Skip to content
Snippets Groups Projects
Verified Commit 4cf1a358 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fix growth neutrality correction in PAC/MCE equation.

parent 380fd84c
No related branches found
No related tags found
No related merge requests found
Pipeline #5870 passed
...@@ -11,7 +11,7 @@ function parameters(pacname) ...@@ -11,7 +11,7 @@ function parameters(pacname)
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% none % none
% Copyright (C) 2019 Dynare Team % Copyright © 2019-2021 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
...@@ -69,8 +69,18 @@ for e=1:number_of_pac_eq ...@@ -69,8 +69,18 @@ for e=1:number_of_pac_eq
% Get PAC equation % Get PAC equation
pac_equation = equations.(eqtag); pac_equation = equations.(eqtag);
% Get Error correction and autoregressive parameters in PAC equation % Get Error correction and autoregressive parameters in PAC equation
a = NaN(1+pac_equation.max_lag, 1); params = NaN(2+pac_equation.max_lag, 1);
a(1) = M_.params(pac_equation.ec.params); params(1) = M_.params(pac_equation.ec.params);
a(1+(1:pac_equation.max_lag)) = M_.params(pac_equation.ar.params); params(1+(1:pac_equation.max_lag)) = M_.params(pac_equation.ar.params);
M_.params(pac_equation.mce.alpha) = a2alpha(a); params(end) = M_.params(pacmodel.discount_index);
[G, alpha, beta] = buildGmatrixWithAlphaAndBeta(params);
M_.params(pac_equation.mce.alpha) = alpha;
if isfield(pacmodel, 'growth_neutrality_param_index')
A = [alpha; 1];
A_1 = polyval(A, 1.0);
A_b = polyval(A, beta);
m = length(alpha);
d = A_1*A_b*(iota(m, m)'*inv((eye(m)-G)*(eye(m)-G))*iota(m, m));
M_.params(pacmodel.growth_neutrality_param_index) = 1-sum(params(2:end-1))-d;
end
end end
\ No newline at end of file
Subproject commit 6863494db2fe509ccb5a0f665167eca0054cc298 Subproject commit 784dd4122afe0f68ac2d0f903c0625b9c7e50b4f
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment