Kalman filter and version 4.1.2

I was estimating a NK model using version 4.1.1 and got the message that led to fixing the bug in the Kalman filter code (Bug in kalman_filter.m).

Now I am running version 4.1.2 and the bug seems to be fixed, however now I get the following error message:

dynare base_est.mod

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.

Starting Dynare (version 4.1.2).
Starting preprocessing of the model file …
Found 10 equation(s).
Evaluating expressions…done
Computing static model derivatives:

  • order 1
    Computing dynamic model derivatives:
  • order 1
  • order 2
    Processing outputs …done
    Preprocessing completed.
    Starting MATLAB/Octave computing.

STEADY-STATE RESULTS:

ygr 0.4
infl 7
int 9.64957
y 0
yst 0
r 0
p 0
u 0
g 0
v 0

EIGENVALUES:
Modulus Real Imaginary

           0                0                0
      0.1863           0.1863                0
         0.2              0.2                0
         0.6              0.6                0
         0.8              0.8                0
       1.281            1.281                0
         2.1              2.1                0
         Inf             -Inf                0

There are 3 eigenvalue(s) larger than 1 in modulus
for 3 forward-looking variable(s)

The rank condition is verified.

You did not declare endogenous variables after the estimation command.
Loading 205 observations from qdatabaseest.xls

??? Error using ==> kalman_filter at 83
The variance of the forecast error remains singular until the end of the sample

Error in ==> DsgeLikelihood at 254
LIK = kalman_filter(T,R,Q,H,Pstar,Y,start,mf,kalman_tol,riccati_tol);

Error in ==> initial_estimation_checks at 60
[fval,cost_flag,ys,trend_coeff,info] =
DsgeLikelihood(xparam1,gend,data,data_index,number_of_observations,no_more_missing_observations);

Error in ==> dynare_estimation_1 at 334
initial_estimation_checks(xparam1,gend,data,data_index,number_of_observations,no_more_missing_observations);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> base_est at 176
dynare_estimation(var_list_);

Error in ==> dynare at 132
evalin(‘base’,fname) ;

Why is that the matrix is singular?
qdatabaseest.xls (38.5 KB)
base_est.mod (1.47 KB)

Dear Manuel,

the size of the standard deviation of the shocks is not specified in your *.mod file. As you have put estimated parameters in front of eu, ev and eg, there variance is obviously 1, but you need to specify it in a SHOCKS block.

Best

Michel