Merge branch 'utilsx' into 'master'

Moved get and set utilities to +get and +set

See merge request Dynare/dynare!1686
time-shift
Sébastien Villemot 2019-12-19 09:42:19 +00:00
commit 2c9ea629bd
5 changed files with 64 additions and 36 deletions

View File

@ -0,0 +1,28 @@
function set_shock_stderr_value(exoname,value)
% Copyright (C) 2019 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
global M_
i = strmatch(exoname,M_.exo_names,'exact');
if isempty(i)
error(['Shock name ' exoname ' doesn''t exist'])
end
M_.Sigma_e(i,i) = value^2;

View File

@ -96,50 +96,50 @@ eps_Ds eps_phijs eps_PensCorr_L eps_PensCorr_F;
% ============================================================
@#for i in wg
set_param_value('Du@{i}',Du@{i});
set_param_value('Dn@{i}',Dn@{i});
set_param_value('h@{i}',h@{i});
set_param_value('h@{i}_f',h@{i}_f);
set_param_value('chi@{i}',chi@{i});
set_param_value('eta@{i}b',eta@{i}b);
set.param_value('Du@{i}',Du@{i});
set.param_value('Dn@{i}',Dn@{i});
set.param_value('h@{i}',h@{i});
set.param_value('h@{i}_f',h@{i}_f);
set.param_value('chi@{i}',chi@{i});
set.param_value('eta@{i}b',eta@{i}b);
@#endfor
@#for i in erg
set_param_value('De_@{i}b',De_@{i}b);
set.param_value('De_@{i}b',De_@{i}b);
@#endfor
set_param_value('rho',rho);
set_param_value('phi',phi);
set_param_value('delta',delta);
set_param_value('alpha',alpha);
set_param_value('beta',beta);
set_param_value('ann',ann);
set_param_value('fc',fc);
set_param_value('nu',nu);
set_param_value('aa',aa);
set.param_value('rho',rho);
set.param_value('phi',phi);
set.param_value('delta',delta);
set.param_value('alpha',alpha);
set.param_value('beta',beta);
set.param_value('ann',ann);
set.param_value('fc',fc);
set.param_value('nu',nu);
set.param_value('aa',aa);
set_param_value('rhoub',rhoub);
set_param_value('rhoeb',rhoeb);
set_param_value('rholb',rholb);
set_param_value('tauwb',tauwb);
set_param_value('taucb',taucb);
set_param_value('taufb',taufb);
set_param_value('taukb',taukb);
set_param_value('gb',gb);
set.param_value('rhoub',rhoub);
set.param_value('rhoeb',rhoeb);
set.param_value('rholb',rholb);
set.param_value('tauwb',tauwb);
set.param_value('taucb',taucb);
set.param_value('taufb',taufb);
set.param_value('taukb',taukb);
set.param_value('gb',gb);
set_param_value('TFPb',TFPb);
set_param_value('ghb',ghb);
set_param_value('rrbb',rrbb);
set.param_value('TFPb',TFPb);
set.param_value('ghb',ghb);
set.param_value('rrbb',rrbb);
set_param_value('thetab',thetab);
set_param_value('tau1b',tau1b);
set_param_value('om1b',om1b);
set_param_value('om2b',om2b);
set_param_value('om2sb',om2sb);
set_param_value('Dsb',Dsb);
set_param_value('phijsb',phijsb);
set.param_value('thetab',thetab);
set.param_value('tau1b',tau1b);
set.param_value('om1b',om1b);
set.param_value('om2b',om2b);
set.param_value('om2sb',om2sb);
set.param_value('Dsb',Dsb);
set.param_value('phijsb',phijsb);
set_param_value('bsY_iss',bsY_iss);
set.param_value('bsY_iss',bsY_iss);
NBRYb=NBR_iss/(phii_iss*gdp_iss);

View File

@ -30,6 +30,6 @@ if abs(oo_.steady_state(1)/(aa*oo_.exo_steady_state(1)*oo_.steady_state(2)^alph-
error('Error in homotopy for c')
end
if abs(oo_.steady_state(2)/((delt+get_param_by_name('bet'))/(aa*oo_.exo_steady_state(1)*alph))^(1/(alph-1)) - 1) > 1e-4
if abs(oo_.steady_state(2)/((delt+get.param_by_name('bet'))/(aa*oo_.exo_steady_state(1)*alph))^(1/(alph-1)) - 1) > 1e-4
error('Error in homotopy for k')
end