From ad2a3a7eccc4ceda31d1b1e9a16434eba96eeade Mon Sep 17 00:00:00 2001 From: Michel Juillard Date: Wed, 14 Dec 2011 21:05:48 +0100 Subject: [PATCH] fixing problem in computation of initial posterior density when steady state model is provided by the user --- matlab/dynare_estimation_init.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m index edddb531b..cbfc02ca5 100644 --- a/matlab/dynare_estimation_init.m +++ b/matlab/dynare_estimation_init.m @@ -322,7 +322,14 @@ else steadystate_check_flag = 1; end -oo_.steady_state = evaluate_steady_state(oo_.steady_state,M_,options_,oo_,steadystate_check_flag); +M = M_; +nvx = estim_params_.nvx; +ncx = estim_params_.ncx; +nvn = estim_params_.nvn; +ncn = estim_params_.ncn; +M.params(estim_params_.param_vals(:,1)) = xparam1(nvx+ncx+nvn+ncn+1:end); + +oo_.steady_state = evaluate_steady_state(oo_.steady_state,M,options_,oo_,steadystate_check_flag); if all(abs(oo_.steady_state(bayestopt_.mfys))<1e-9) options_.noconstant = 1; else