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

Fix aux. equation for PAC expecation in cherrypick (MCE).

The RHS of the equation was not acknowledging the user provided name
for the auxiliary variable.
parent 1fedaa22
No related branches found
No related tags found
No related merge requests found
...@@ -188,8 +188,8 @@ try ...@@ -188,8 +188,8 @@ try
end end
else else
% MCE version of the PAC equation. % MCE version of the PAC equation.
[rhs, growthneutralitycorrection] = write_pac_mce_expectations(eqtags{i}, ispac.name);
auxlhs = M_.endo_names{M_.pac.(ispac.name).mce.z1}; auxlhs = M_.endo_names{M_.pac.(ispac.name).mce.z1};
[rhs, growthneutralitycorrection] = write_pac_mce_expectations(eqtags{i}, ispac.name, auxlhs);
if isempty(growthneutralitycorrection) if isempty(growthneutralitycorrection)
RHS = strrep(RHS, sprintf('pac_expectation(model_name = %s)', ispac.name), auxlhs); RHS = strrep(RHS, sprintf('pac_expectation(model_name = %s)', ispac.name), auxlhs);
else else
......
function [expression, growthneutralitycorrection] = write_pac_mce_expectations(eqname, expectationmodelname) function [expression, growthneutralitycorrection] = write_pac_mce_expectations(eqname, expectationmodelname, auxname)
% Prints the expansion of the PAC_EXPECTATION term in files. % Prints the expansion of the PAC_EXPECTATION term in files.
% %
...@@ -32,8 +32,6 @@ global M_ ...@@ -32,8 +32,6 @@ global M_
expectationmodel = M_.pac.(expectationmodelname); expectationmodel = M_.pac.(expectationmodelname);
auxname = sprintf('%s_Z', eqname);
targetid = expectationmodel.ec.vars((expectationmodel.ec.istarget==true)); targetid = expectationmodel.ec.vars((expectationmodel.ec.istarget==true));
alphaid = expectationmodel.mce.alpha; alphaid = expectationmodel.mce.alpha;
betaid = expectationmodel.discount_index; betaid = expectationmodel.discount_index;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment