ramsey policy urgent help needed

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.

ramsey policy urgent help needed

Postby sub_macro » Wed Apr 27, 2011 7:49 pm

Hi,

I am trying to solve a ramsey policy problem in a closed economy setup.I got the first order conditions and the steady states and I went ahead in coding the problem in Dynare version 4.2.0 (with Matlab version R2010a in windows). However after having finished coding in dynare, when I run the model.mod file which I have written I get the following error message.

??? Error using ==> lnsrch1 at 53
Some element of Newton direction isn't finite. Jacobian maybe singular or there is a
problem with initial values

Error in ==> solve1 at 127
[x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin{:});

Error in ==> dynare_solve at 124
[x,info]=solve1(func,x,j1(r(i):r(i+1)-1),j2(r(i):r(i+1)-1),jacobian_flag,
bad_cond_flag, varargin{:});

Error in ==> dr1 at 124
[oo_.steady_state,info1] = dynare_solve('dyn_ramsey_static_', ...

Error in ==> resol at 145
[dr,info,M_,options_,oo_] = dr1(dr,check_flag,M_,options_,oo_);

Error in ==> stoch_simul at 66
[oo_.dr, info] = resol(oo_.steady_state,0);

Error in ==> ramsey_policy at 25
info = stoch_simul(var_list);

Error in ==> model at 160
ramsey_policy(var_list_);

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

So I decided to write a matlab file called model_steadystate.m to solve the problem. Now when I run the model.mod file again I get the following error message.

??? Reference to non-existent field 'instruments'.

Error in ==> dr1 at 94
instruments = options_.instruments;

Error in ==> resol at 145
[dr,info,M_,options_,oo_] = dr1(dr,check_flag,M_,options_,oo_);

Error in ==> stoch_simul at 66
[oo_.dr, info] = resol(oo_.steady_state,0);

Error in ==> ramsey_policy at 25
info = stoch_simul(var_list);

Error in ==> model at 160
ramsey_policy(var_list_);

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

I am attaching my model.mod and model_steadystate.m files. My main aim is to get the optimal policy and transition functions and the IRFs. Any help or comment is greatly appreciated. I have a paper to submit within a week, so anyone please help me out!!.
Attachments
model.mod
my main codes in dynare
(1.49 KiB) Downloaded 97 times
model_steadystate.m
codes to calculate the steady state
(917 Bytes) Downloaded 92 times
sub_macro
 
Posts: 5
Joined: Wed Apr 27, 2011 5:52 pm

Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests