parent
af72c1bd22
commit
75e52ed71d
|
@ -5849,8 +5849,9 @@ singularity is encountered, Dynare by default automatically switches to the univ
|
||||||
@item fast_kalman_filter
|
@item fast_kalman_filter
|
||||||
@anchor{fast_kalman_filter} Select the fast Kalman filter using Chandrasekhar
|
@anchor{fast_kalman_filter} Select the fast Kalman filter using Chandrasekhar
|
||||||
recursions as described by @cite{Herbst, 2015}. This setting is only used with
|
recursions as described by @cite{Herbst, 2015}. This setting is only used with
|
||||||
@code{kalman_algo=1} or @code{kalman_algo=3}. It is not yet compatible with
|
@code{kalman_algo=1} or @code{kalman_algo=3}. In case of using the diffuse Kalman
|
||||||
@code{analytical_derivation}.
|
filter (@code{kalman_algo=3/lik_init=3}), the observables must be stationary. This option
|
||||||
|
is not yet compatible with @code{analytical_derivation}.
|
||||||
|
|
||||||
@item kalman_tol = @var{DOUBLE}
|
@item kalman_tol = @var{DOUBLE}
|
||||||
@anchor{kalman_tol} Numerical tolerance for determining the singularity of the covariance matrix of the prediction errors during the Kalman filter (minimum allowed reciprocal of the matrix condition number). Default value is @code{1e-10}
|
@anchor{kalman_tol} Numerical tolerance for determining the singularity of the covariance matrix of the prediction errors during the Kalman filter (minimum allowed reciprocal of the matrix condition number). Default value is @code{1e-10}
|
||||||
|
|
|
@ -655,6 +655,17 @@ if ((kalman_algo==1) || (kalman_algo==3))% Multivariate Kalman Filter
|
||||||
[err, LIK] = block_kalman_filter(T,R,Q,H,Pstar,Y,start,Z,kalman_tol,riccati_tol, Model.nz_state_var, Model.n_diag, Model.nobs_non_statevar);
|
[err, LIK] = block_kalman_filter(T,R,Q,H,Pstar,Y,start,Z,kalman_tol,riccati_tol, Model.nz_state_var, Model.n_diag, Model.nobs_non_statevar);
|
||||||
mexErrCheck('block_kalman_filter', err);
|
mexErrCheck('block_kalman_filter', err);
|
||||||
elseif DynareOptions.fast_kalman_filter
|
elseif DynareOptions.fast_kalman_filter
|
||||||
|
if diffuse_periods
|
||||||
|
%kalman_algo==3 requires no diffuse periods (stationary
|
||||||
|
%observables) as otherwise FE matrix will not be positive
|
||||||
|
%definite
|
||||||
|
fval = Inf;
|
||||||
|
info(1) = 55;
|
||||||
|
info(4) = 0.1;
|
||||||
|
exit_flag = 0;
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
[LIK,lik] = kalman_filter_fast(Y,diffuse_periods+1,size(Y,2), ...
|
[LIK,lik] = kalman_filter_fast(Y,diffuse_periods+1,size(Y,2), ...
|
||||||
a,Pstar, ...
|
a,Pstar, ...
|
||||||
kalman_tol, riccati_tol, ...
|
kalman_tol, riccati_tol, ...
|
||||||
|
|
|
@ -123,6 +123,8 @@ if ~noprint
|
||||||
error('You are estimating a DSGE-VAR model, but the value of the dsge prior weight is too low!')
|
error('You are estimating a DSGE-VAR model, but the value of the dsge prior weight is too low!')
|
||||||
case 52 %dsge_var_likelihood
|
case 52 %dsge_var_likelihood
|
||||||
error('You are estimating a DSGE-VAR model, but the implied covariance matrix of the VAR''s innovations is not positive definite!');
|
error('You are estimating a DSGE-VAR model, but the implied covariance matrix of the VAR''s innovations is not positive definite!');
|
||||||
|
case 55
|
||||||
|
error('Fast Kalman filter only works with stationary models [lik_init=1] or stationary observables for non-stationary models [lik_init=3]')
|
||||||
case 61 %Discretionary policy
|
case 61 %Discretionary policy
|
||||||
error(['Discretionary policy: maximum number of iterations has been reached. Procedure failed. ']);
|
error(['Discretionary policy: maximum number of iterations has been reached. Procedure failed. ']);
|
||||||
case 62
|
case 62
|
||||||
|
|
Loading…
Reference in New Issue