Fix option loglinear for stoch_simul.m by also logging steady state.

Must be done to assure correct simulations and output of moments. Cannot be done in the solver itself as estimation performs logging of steady state also outside of solver
time-shift
Johannes Pfeifer 2014-01-29 19:21:16 +01:00
parent dfd9e3819b
commit 3da8e92aa5
1 changed files with 7 additions and 3 deletions

View File

@ -38,9 +38,9 @@ elseif options_.order == 3
options_.k_order_solver = 1;
end
if options_.loglinear == 1 && options_.periods>0
error('The loglinear option does not work with periods>0.')
end
% if options_.loglinear == 1 && options_.periods>0
% error('The loglinear option does not work with periods>0.')
% end
if isempty(options_.qz_criterium)
options_.qz_criterium = 1+1e-6;
@ -84,6 +84,10 @@ else
[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);
end
if info(1)
options_ = options_old;
print_info(info, options_.noprint, options_);