From 5eaa2914f57f7d49d765e76ee15a0774d018a112 Mon Sep 17 00:00:00 2001
From: Marco Ratto <marco.ratto@jrc.ec.europa.eu>
Date: Fri, 20 Jan 2012 16:01:00 +0100
Subject: [PATCH] Bug fixes for small MC sample sizes and large models.

---
 matlab/dynare_identification.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/matlab/dynare_identification.m b/matlab/dynare_identification.m
index 89f462ff9..8873fd307 100644
--- a/matlab/dynare_identification.m
+++ b/matlab/dynare_identification.m
@@ -156,7 +156,7 @@ if iload <=0,
     if SampleSize==1,
         BurninSampleSize=0;
     else
-        BurninSampleSize=50;
+        BurninSampleSize=min(SampleSize,50);
     end
     loop_indx = 0;
     file_index = 0;
@@ -350,6 +350,7 @@ if iload <=0,
                     else
                         normaliz1 = ones(1,nparam);
                     end
+                    replic=max(replic,3*length(indJJ));
                     cmm = simulated_moment_uncertainty(indJJ, periods, replic);
                     %                 Jinv=(siJ(:,indok)'*siJ(:,indok))\siJ(:,indok)';
                     %                 MIM=inv(Jinv*cmm*Jinv');
-- 
GitLab