From 3da8e92aa55c4e4ffe447085090c1aad99d8c78a Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Wed, 29 Jan 2014 19:21:16 +0100 Subject: [PATCH] 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 --- matlab/stoch_simul.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/matlab/stoch_simul.m b/matlab/stoch_simul.m index 03c5ede5c..964542d16 100644 --- a/matlab/stoch_simul.m +++ b/matlab/stoch_simul.m @@ -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_);