From c5b8c596f2ff23e8a2ed824c7d1aad292df2a129 Mon Sep 17 00:00:00 2001
From: adjemian <adjemian@ac1d8469-bf42-47a9-8791-bf33cf982152>
Date: Mon, 22 Jan 2007 13:33:59 +0000
Subject: [PATCH] do not compute the marginal density (harmonic mean estimator)
 when mh_replic = 0 and load_mh_file = 1

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1156 ac1d8469-bf42-47a9-8791-bf33cf982152
---
 matlab/dynare_estimation.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/matlab/dynare_estimation.m b/matlab/dynare_estimation.m
index 314940f2c5..745ef53633 100644
--- a/matlab/dynare_estimation.m
+++ b/matlab/dynare_estimation.m
@@ -863,7 +863,9 @@ if (any(bayestopt_.pshape  >0 ) & options_.mh_replic) | ...
   %% Here i discard first half of the draws:
   CutSample;
   %% Estimation of the marginal density from the Mh draws:
-  marginal = marginal_density;
+  if options_.mh_replic
+      marginal = marginal_density;
+  end
   %% 
   GetPosteriorParametersStatistics;
   PlotPosteriorDistributions;
-- 
GitLab