Estimation problem

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Estimation problem

Postby tomnilson40 » Fri Oct 26, 2012 5:14 am

Hey Dynare folks,

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

Code: Select all
Blanchard Kahn conditions are not satisfied: no stable equilibrium


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?!

Cheers
tomnilson40
 
Posts: 26
Joined: Fri Aug 31, 2012 4:37 am

Re: Estimation problem

Postby jpfeifer » Fri Oct 26, 2012 7:48 am

Use the simulation values as starting values for estimation. If the problem persists, post the mod-files.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Estimation problem

Postby tomnilson40 » Sat Oct 27, 2012 3:15 am

Hi,

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.

Thanks
Last edited by tomnilson40 on Mon Mar 04, 2013 12:56 am, edited 1 time in total.
tomnilson40
 
Posts: 26
Joined: Fri Aug 31, 2012 4:37 am

Re: Estimation problem

Postby jpfeifer » Sat Oct 27, 2012 10:34 am

No, you should use the same starting values for the parameters. Otherwise, Dynare starts at the prior mean.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Estimation problem

Postby tomnilson40 » Mon Oct 29, 2012 1:45 am

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;).
tomnilson40
 
Posts: 26
Joined: Fri Aug 31, 2012 4:37 am

Re: Estimation problem

Postby jpfeifer » Mon Oct 29, 2012 8:21 am

Your problem is the unit root in the model. For simulation,this is not a problem, but for estimation.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Estimation problem

Postby tomnilson40 » Sat Nov 17, 2012 11:20 am

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 :x
I have tried some other equations as well but the output is the same!

Code: Select all
var   T;
varexo   e, pstar, p, y, ystar;

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

model;
T =  p15*(e+pstar-p) - p16*y + p17*ystar;
end;

initval;
T=0;
end;

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

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
numel(lead_lag_incidence)=1.

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_,
bayestopt_);

Error in ==> dynare_estimation at 70
    dynare_estimation_1(var_list,dname);

Error in ==> Model at 111
dynare_estimation(var_list_);

Error in ==> dynare at 120
evalin('base',fname) ;


Thanks a lot for any help.
tomnilson40
 
Posts: 26
Joined: Fri Aug 31, 2012 4:37 am

Re: Estimation problem

Postby jpfeifer » Mon Nov 19, 2012 8:22 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Estimation problem

Postby tomnilson40 » Mon Nov 19, 2012 8:41 am

Hi,

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

Cheers
tomnilson40
 
Posts: 26
Joined: Fri Aug 31, 2012 4:37 am

Re: Estimation problem

Postby jpfeifer » Mon Nov 19, 2012 9:30 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Estimation problem

Postby tomnilson40 » Mon Nov 19, 2012 9:41 am

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
tomnilson40
 
Posts: 26
Joined: Fri Aug 31, 2012 4:37 am


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 4 guests