From 75439d2176b1d6174a7a9ea2ddd645daade0cad2 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Thu, 3 Oct 2024 20:52:35 +0200
Subject: [PATCH] posterior_analysis.m: add comments

---
 matlab/estimation/posterior_analysis.m | 38 +++++++++++++-------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/matlab/estimation/posterior_analysis.m b/matlab/estimation/posterior_analysis.m
index a412e4277..b334bdce9 100644
--- a/matlab/estimation/posterior_analysis.m
+++ b/matlab/estimation/posterior_analysis.m
@@ -20,25 +20,25 @@ function oo_ = posterior_analysis(type,arg1,arg2,arg3,options_,M_,oo_,estim_para
 info = check_posterior_analysis_data(type,M_,options_);
 SampleSize = options_.sub_draws;
 switch info
-  case 0
-    disp('check_posterior_analysis_data:: Can''t find any mcmc file!')
-    error('Check the options of the estimation command...')
-  case {1,2}
-    MaxMegaBytes = options_.MaximumNumberOfMegaBytes;
-    drsize = size_of_the_reduced_form_model(oo_.dr);
-    if drsize*SampleSize>MaxMegaBytes
-        drsize=0;
-    end
-    selec_posterior_draws(M_,options_,oo_.dr, oo_.steady_state, oo_.exo_steady_state, oo_.exo_det_steady_state,estim_params_,SampleSize,drsize); %save draws to disk
-    oo_ = job(type,SampleSize,arg1,arg2,arg3,options_,M_,oo_);
-  case {4,5}
-    oo_ = job(type,SampleSize,arg1,arg2,arg3,options_,M_,oo_);
-  case 6
-    [ivar,vartan] = get_variables_list(options_,M_);
-    nvar = length(ivar);
-    oo_ = job(type,SampleSize,arg1,arg2,arg3,options_,M_,oo_,nvar,vartan);
-  otherwise
-    error('posterior_analysis:: Check_posterior_analysis_data gave a meaningless output!')
+    case 0
+        disp('check_posterior_analysis_data:: Can''t find any mcmc file!')
+        error('Check the options of the estimation command...')
+    case {1,2} %need to get draws and store posterior
+        MaxMegaBytes = options_.MaximumNumberOfMegaBytes;
+        drsize = size_of_the_reduced_form_model(oo_.dr);
+        if drsize*SampleSize>MaxMegaBytes
+            drsize=0;
+        end
+        selec_posterior_draws(M_,options_,oo_.dr, oo_.steady_state, oo_.exo_steady_state, oo_.exo_det_steady_state,estim_params_,SampleSize,drsize); %save draws to disk
+        oo_ = job(type,SampleSize,arg1,arg2,arg3,options_,M_,oo_);
+    case {4,5} %process draws and save files
+        oo_ = job(type,SampleSize,arg1,arg2,arg3,options_,M_,oo_);
+    case 6 %just read out
+        [ivar,vartan] = get_variables_list(options_,M_);
+        nvar = length(ivar);
+        oo_ = job(type,SampleSize,arg1,arg2,arg3,options_,M_,oo_,nvar,vartan);
+    otherwise
+        error('posterior_analysis:: Check_posterior_analysis_data gave a meaningless output!')
 end
 
 
-- 
GitLab