From 973302e42e0f40bacbae21c2f7c7da9ef0e216b7 Mon Sep 17 00:00:00 2001 From: Michel Juillard <michel.juillard@mjui.fr> Date: Wed, 18 Apr 2012 21:15:18 +0200 Subject: [PATCH] fixing bugs in smoother --- matlab/dynare_estimation_1.m | 2 +- matlab/dynare_estimation_init.m | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m index db0a58d07e..312552d3d6 100644 --- a/matlab/dynare_estimation_1.m +++ b/matlab/dynare_estimation_1.m @@ -902,7 +902,7 @@ end if (~((any(bayestopt_.pshape > 0) && options_.mh_replic) || (any(bayestopt_.pshape ... > 0) && options_.load_mh_file)) ... - || ~options_.smoother ) && M_.endo_nbr^2*gend < 1e7 && options_.partial_information == 0 % to be fixed + || ~options_.smoother ) && options_.partial_information == 0 % to be fixed %% ML estimation, or posterior mode without metropolis-hastings or metropolis without bayesian smooth variable [atT,innov,measurement_error,updated_variables,ys,trend_coeff,aK,T,R,P,PK,decomp] = DsgeSmoother(xparam1,dataset_.info.ntobs,dataset_.data,dataset_.missing.aindex,dataset_.missing.state); oo_.Smoother.SteadyState = ys; diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m index ae257dfaf1..52cb5111ce 100644 --- a/matlab/dynare_estimation_init.m +++ b/matlab/dynare_estimation_init.m @@ -253,7 +253,7 @@ if options_.block == 1 [k2, i_posA, i_posB] = union(k3p, M_.state_var', 'rows'); bayestopt_.smoother_var_list = [k3p(i_posA); M_.state_var(sort(i_posB))']; - [junk,bayestopt_.smoother_saved_var_list] = intersect(k3p,bayestopt_.smoother_var_list(:)); + [junk,junk,bayestopt_.smoother_saved_var_list] = intersect(k3p,bayestopt_.smoother_var_list(:)); [junk,ic] = intersect(bayestopt_.smoother_var_list,M_.state_var); bayestopt_.smoother_restrict_columns = ic; [junk,bayestopt_.smoother_mf] = ismember(k1, ... @@ -273,7 +273,7 @@ else oo_.dr.restrict_columns = [ic; length(k2)+(1:nspred-npred)']; bayestopt_.smoother_var_list = union(k2,k3); - [junk,bayestopt_.smoother_saved_var_list] = intersect(k3,bayestopt_.smoother_var_list(:)); + [junk,junk,bayestopt_.smoother_saved_var_list] = intersect(k3,bayestopt_.smoother_var_list(:)); [junk,ic] = intersect(bayestopt_.smoother_var_list,nstatic+(1:npred)'); bayestopt_.smoother_restrict_columns = ic; [junk,bayestopt_.smoother_mf] = ismember(var_obs_index, ... -- GitLab