Estimation problem

Hey Dynare folks,

I faced with the below error while estimating my model (with both Bayesian and MLE);

but when I use the "stoch_simul "command there is no problem and I get the simulation results properly.

Does anyone have any idea?! should i change the initial values or any change in the parameter values or even estimation options?!


Use the simulation values as starting values for estimation. If the problem persists, post the mod-files.


If you mean the initial values for the variables then I have used the same initial values that I used in simulation (all zero). However, I have attached the .mod and .xls file to have a look. I use Dynare 4.3.0.


No, you should use the same starting values for the parameters. Otherwise, Dynare starts at the prior mean.

I have used exactly the same parameter starting value for estimation as I have used for simulation. In the attached file the parameters are written in the ML estimation format (parameter name, initial value, boundaries_low, …_up;).

Your problem is the unit root in the model. For simulation,this is not a problem, but for estimation.

Thanks for your reply, sorry for getting back late.

Now I am trying to estimate a single equation from the model above but I just keep getting the below message. It seems that I am making a silly mistake :angry:
I have tried some other equations as well but the output is the same!

[code]var T;
varexo e, pstar, p, y, ystar;

parameters p15, p16, p17;
p15= .5;
p16= .5;
p17= .5;

T = p15*(e+pstar-p) - p16y + p17ystar;


varobs T;
p15, .5, .1, .9;
p16, .5, .1, .9;
p17, .5, .1, .9;

estimation(datafile=data2,mode_compute=4, mh_replic=0);

dynare Model2

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).

Starting Dynare (version 4.3.0).
Starting preprocessing of the model file …
Found 1 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.

You did not declare endogenous variables after the estimation/calib_smoother command.
??? Attempted to access lead_lag_incidence(2,1); index out of bounds because

Error in ==> set_state_space at 73
kmask = lead_lag_incidence(max_lag+2,order_var) ;

Error in ==> dynare_estimation_init at 194
dr = set_state_space(oo_.dr,M_);

Error in ==> dynare_estimation_1 at 59
[dataset_,xparam1, M_, options_, oo_, estim_params_,bayestopt_] =
dynare_estimation_init(var_list_, dname, ], M_, options_, oo_, estim_params_,

Error in ==> dynare_estimation at 70

Error in ==> Model at 111

Error in ==> dynare at 120
evalin(‘base’,fname) ;[/code]

Thanks a lot for any help.

Your model is totally degenerate now as it features absolutely no dynamics. The only endogenous variable is a linear combination of shocks, none of which is separately identified.


Thanks, so you mean it is not possible to estimate a single equation in Dynare?


Currently, you cannot estimate such degenerate equations. You could estimate a single AR(1)-process for example. But your equation does not contain past or future endogenous variables. Note also that the individual shocks are not identified.

Sorry for asking too much,

Does the shock need to be a term (or an exogenous variable) in one of the equations of the model or should be considered as a separate equation?

Many Thanks