v4 : dynare_estimation.m: corrected bug with load_mh_file

simplified calls to random_walk_metropolis_hastings()


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1755 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
michel 2008-03-30 08:33:59 +00:00
parent 7d66de73f7
commit b67c5f596a
1 changed files with 7 additions and 14 deletions

View File

@ -865,22 +865,15 @@ if (any(bayestopt_.pshape >0 ) & options_.mh_replic) | ...
find(xparam1 > bounds(:,2))
error('Mode values are outside prior bounds. Reduce prior_trunc.')
end
% runs MCMC
if options_.mh_replic
if ~options_.load_mh_file
if ~options_.bvar_dsge
random_walk_metropolis_hastings('DsgeLikelihood','rand_multivariate_normal',xparam1,invhess,bounds,gend,data);
else
random_walk_metropolis_hastings('DsgeVarLikelihood','rand_multivariate_normal',xparam1,invhess,bounds,gend);
end
else
if options_.use_mh_covariance_matrix
if options_.load_mh_file & options_.use_mh_covariance_matrix
invhess = compute_mh_covariance_matrix;
end
if ~options_.bvar_dsge
metropolis('DsgeLikelihood',xparam1,invhess,bounds,gend,data);
else
metropolis('DsgeVarLikelihood',xparam1,invhess,bounds,gend);
end
end
if options_.bvar_dsge
random_walk_metropolis_hastings('DsgeVarLikelihood','rand_multivariate_normal',xparam1,invhess,bounds,gend);
else
random_walk_metropolis_hastings('DsgeLikelihood','rand_multivariate_normal',xparam1,invhess,bounds,gend,data);
end
end
if ~options_.nodiagnostic & options_.mh_replic > 1000 & options_.mh_nblck > 1