Make sure repeated runs of stoch_simul.m with loglinear option do not crash due to logged steady state
parent
6575d5ab5e
commit
15f0353d02
|
@ -374,6 +374,7 @@ options_.lik_init = 1;
|
|||
options_.load_mh_file = 0;
|
||||
options_.logdata = 0;
|
||||
options_.loglinear = 0;
|
||||
options_.logged_steady_state = 0;
|
||||
options_.mh_conf_sig = 0.90;
|
||||
options_.prior_interval = 0.90;
|
||||
options_.mh_drop = 0.5;
|
||||
|
|
|
@ -81,12 +81,17 @@ elseif options_.discretionary_policy
|
|||
end
|
||||
[oo_.dr,ys,info] = discretionary_policy_1(oo_,options_.instruments);
|
||||
else
|
||||
if options_.logged_steady_state
|
||||
oo_.dr.ys=exp(oo_.dr.ys);
|
||||
oo_.steady_state=exp(oo_.steady_state);
|
||||
end
|
||||
[oo_.dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
|
||||
end
|
||||
|
||||
if options_.loglinear
|
||||
oo_.dr.ys=log(oo_.dr.ys);
|
||||
oo_.steady_state=log(oo_.steady_state);
|
||||
options_old.logged_steady_state = 1;
|
||||
end
|
||||
if info(1)
|
||||
options_ = options_old;
|
||||
|
|
Loading…
Reference in New Issue