Skip to content
Snippets Groups Projects
Commit 11f99f72 authored by sebastien's avatar sebastien
Browse files

trunk preprocessor: fixed bug with estimated_params_init and...

trunk preprocessor: fixed bug with estimated_params_init and estimated_params_bounds in conjunction with correlation of endogenous variables


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2366 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 095ff8a7
No related branches found
No related tags found
No related merge requests found
/* /*
* Copyright (C) 2003-2008 Dynare Team * Copyright (C) 2003-2009 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -495,7 +495,7 @@ EstimatedParamsInitStatement::writeOutput(ostream &output, const string &basenam ...@@ -495,7 +495,7 @@ EstimatedParamsInitStatement::writeOutput(ostream &output, const string &basenam
else if (symbol_table.getType(it->name) == eEndogenous) else if (symbol_table.getType(it->name) == eEndogenous)
{ {
output << "tmp1 = find((estim_params_.corrn(:,1)==" << symbol_table.getID(it->name)+1 << ")) & (estim_params_.corrn(:,2)==" << symbol_table.getID(it->name2)+1 << ";\n"; output << "tmp1 = find((estim_params_.corrn(:,1)==" << symbol_table.getID(it->name)+1 << ")) & (estim_params_.corrn(:,2)==" << symbol_table.getID(it->name2)+1 << ";\n";
output << "estim_params_.corrx(tmp1,3) = " << it->init_val << ";\n"; output << "estim_params_.corrn(tmp1,3) = " << it->init_val << ";\n";
} }
} }
} }
...@@ -547,8 +547,8 @@ EstimatedParamsBoundsStatement::writeOutput(ostream &output, const string &basen ...@@ -547,8 +547,8 @@ EstimatedParamsBoundsStatement::writeOutput(ostream &output, const string &basen
else if (symbol_table.getType(it->name) == eEndogenous) else if (symbol_table.getType(it->name) == eEndogenous)
{ {
output << "tmp1 = find((estim_params_.corrn(:,1)==" << symbol_table.getID(it->name)+1 << ")) & (estim_params_.corrn(:,2)==" << symbol_table.getID(it->name2)+1 << ";\n"; output << "tmp1 = find((estim_params_.corrn(:,1)==" << symbol_table.getID(it->name)+1 << ")) & (estim_params_.corrn(:,2)==" << symbol_table.getID(it->name2)+1 << ";\n";
output << "estim_params_.corrx(tmp1,4) = " << it->low_bound << ";\n"; output << "estim_params_.corrn(tmp1,4) = " << it->low_bound << ";\n";
output << "estim_params_.corrx(tmp1,5) = " << it->up_bound << ";\n"; output << "estim_params_.corrn(tmp1,5) = " << it->up_bound << ";\n";
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment