From 7a16ab15fe6b26166691aba3f96296fb7083a149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Thu, 27 Oct 2011 18:03:42 +0200 Subject: [PATCH] No longer report momemts in stoch_simul with order>=3 if periods not specified Previously Dynare was reporting dummy theoretical moments --- matlab/stoch_simul.m | 5 ++++- matlab/th_autocovariances.m | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/matlab/stoch_simul.m b/matlab/stoch_simul.m index cff226ea5..7d6e18b8e 100644 --- a/matlab/stoch_simul.m +++ b/matlab/stoch_simul.m @@ -138,7 +138,10 @@ if options_.nomoments == 0 if PI_PCL_solver PCL_Part_info_moments (0, PCL_varobs, oo_.dr, i_var); elseif options_.periods == 0 - disp_th_moments(oo_.dr,var_list); + % There is no code for theoretical moments at 3rd order + if options_.order <= 2 + disp_th_moments(oo_.dr,var_list); + end else disp_moments(oo_.endo_simul,var_list); end diff --git a/matlab/th_autocovariances.m b/matlab/th_autocovariances.m index 477221bb7..034336fcc 100644 --- a/matlab/th_autocovariances.m +++ b/matlab/th_autocovariances.m @@ -45,6 +45,10 @@ if nargin<5 nodecomposition = 0; end +if options_.order >= 3 + error('Theoretical moments not implemented above 2nd order') +end + endo_nbr = M_.endo_nbr; exo_names_orig_ord = M_.exo_names_orig_ord; if exist('OCTAVE_VERSION')