diff --git a/doc/manual/source/the-model-file.rst b/doc/manual/source/the-model-file.rst index dafd275b1..87118097e 100644 --- a/doc/manual/source/the-model-file.rst +++ b/doc/manual/source/the-model-file.rst @@ -5361,6 +5361,11 @@ All of these elements are discussed in the following. to NaN and the standard deviation of the associated shock set to 0 for the corresponding periods using the ``heteroskedastic_shocks``-block. + Note that models with unit roots will require the user to specify the ``diffuse_filter``-option as + otherwise Blanchard-Kahn errors will be triggered. For the piecewise Kalman filter, the + initialization steps in the diffuse filter will always rely on the model solved for the baseline + regime, without checking whether this is the actual regime in the first period(s). + *Example* :: @@ -5469,7 +5474,8 @@ All of these elements are discussed in the following. .. option:: likelihood_piecewise_kalman_filter Employ the piecewise Kalman filter of *Giovannini, Pfeiffer, and Ratto (2021)* when estimating - the model. Default: enabled. + the model. Note that this filter is incompatible with univariate Kalman filters, i.e. ``kalman_algo=2,4``. + Default: enabled. .. option:: likelihood_max_kalman_iterations @@ -7500,7 +7506,9 @@ block decomposition of the model (see :opt:`block`). Koopman (2012)* and *Koopman and Durbin (2003)* for the multivariate and *Koopman and Durbin (2000)* for the univariate filter) to estimate models with non-stationary observed - variables. + variables. This option will also reset the ``qz_criterium`` to + count unit root variables towards the stable variables. Trying to estimate + a model with unit roots will otherwise result in a Blanchard-Kahn error. When ``diffuse_filter`` is used the ``lik_init`` option of ``estimation`` has no effect. diff --git a/matlab/initial_estimation_checks.m b/matlab/initial_estimation_checks.m index 733c23744..4c3bd3fd5 100644 --- a/matlab/initial_estimation_checks.m +++ b/matlab/initial_estimation_checks.m @@ -20,7 +20,7 @@ function DynareResults = initial_estimation_checks(objective_function,xparam1,Dy % SPECIAL REQUIREMENTS % none -% Copyright © 2003-2018 Dynare Team +% Copyright © 2003-2022 Dynare Team % % This file is part of Dynare. % @@ -80,6 +80,12 @@ if DynareOptions.occbin.likelihood.status || DynareOptions.occbin.smoother.statu if DynareOptions.prefilter error('initial_estimation_checks:: Occbin is incompatible with the prefilter option due to the sample mean generally not corresponding to the steady state with an occasionally binding constraint.') end + if ~DynareOptions.occbin.likelihood.inversion_filter && (DynareOptions.kalman_algo==2 || DynareOptions.kalman_algo==4) + error('initial_estimation_checks:: Occbin is incompatible with the selected univariate Kalman filter.') + end + if DynareOptions.fast_kalman_filter + error('initial_estimation_checks:: Occbin is incompatible with the fast Kalman filter.') + end end if (DynareOptions.occbin.likelihood.status && DynareOptions.occbin.likelihood.inversion_filter) || (DynareOptions.occbin.smoother.status && DynareOptions.occbin.smoother.inversion_filter)