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
Branches
No related tags found
No related merge requests found
......@@ -188,8 +188,8 @@ try
end
else
% 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};
[rhs, growthneutralitycorrection] = write_pac_mce_expectations(eqtags{i}, ispac.name, auxlhs);
if isempty(growthneutralitycorrection)
RHS = strrep(RHS, sprintf('pac_expectation(model_name = %s)', ispac.name), auxlhs);
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.
%
......@@ -32,8 +32,6 @@ global M_
expectationmodel = M_.pac.(expectationmodelname);
auxname = sprintf('%s_Z', eqname);
targetid = expectationmodel.ec.vars((expectationmodel.ec.istarget==true));
alphaid = expectationmodel.mce.alpha;
betaid = expectationmodel.discount_index;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment