From 227b2661cbea558cb2ed7e108d0fd229eed6b27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= <stepan@adjemian.eu> Date: Thu, 19 Dec 2019 22:52:39 +0100 Subject: [PATCH] Do not trap order>2 in estimation. --- matlab/dynare_estimation_1.m | 8 ++------ matlab/dynare_estimation_init.m | 3 --- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m index 2245dc290c..64ba51ba40 100644 --- a/matlab/dynare_estimation_1.m +++ b/matlab/dynare_estimation_1.m @@ -52,7 +52,7 @@ end % Set particle filter flag. if options_.order > 1 - if options_.particle.status && options_.order==2 + if options_.particle.status skipline() disp('Estimation using a non linear filter!') skipline() @@ -78,12 +78,8 @@ if options_.order > 1 end end end - elseif options_.particle.status && options_.order>2 - error(['Non linear filter are not implemented with order ' int2str(options_.order) ' approximation of the model!']) - elseif ~options_.particle.status && options_.order==2 - error('For estimating the model with a second order approximation using a non linear filter, one should have options_.particle.status=true;') else - error(['Cannot estimate a model with an order ' int2str(options_.order) ' approximation!']) + error('For estimating the model with a second order approximation using a non linear filter, one should have options_.particle.status=true;') end end diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m index 5bd1ce9aca..e7eb1da828 100644 --- a/matlab/dynare_estimation_init.m +++ b/matlab/dynare_estimation_init.m @@ -101,9 +101,6 @@ if length(unique(options_.varobs))<length(options_.varobs) end % Check the perturbation order (nonlinear filters with third order perturbation, or higher order, are not yet implemented). -if options_.order>2 - error(['I cannot estimate a model with a ' int2str(options_.order) ' order approximation of the model!']) -end % analytical derivation is not yet available for kalman_filter_fast if options_.analytic_derivation && options_.fast_kalman_filter -- GitLab