Problem with convergence

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.

Problem with convergence

Postby macroresearch123 » Sat Nov 09, 2013 11:28 pm

Hi again,

Now that the code is properly working, I cannot seem to converge to a steady state. I tried using homotopy methods, but I obtain an error (below). Your suggestions have been very helpful last time, so I really appreciate anything that jumps out at you as being possibly wrong. The mod file is also attached.

HOMOTOPY mode 1: computing step 0/50...
??? 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 128
[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 ==> evaluate_steady_state at 66
[ys,check] = dynare_solve([M.fname
'_static'],...

Error in ==> steady_ at 54
[steady_state,params,info] =
evaluate_steady_state(oo_.steady_state,M_,options_,oo_,~options_.steadystate.nocheck);
Error in ==> homotopy1 at 88
[steady_state,M.params,info] = steady_(M,options,oo);

Error in ==> steady at 49
[M_,oo_,info,ip,ix,ixd] =
homotopy1(options_.homotopy_values,options_.homotopy_steps,M_,options_,oo_);

Error in ==> planner_toy at 152
steady;

Error in ==> dynare at 120
evalin('base',fname) ;
Attachments
planner_toy.mod
(2.14 KiB) Downloaded 66 times
macroresearch123
 
Posts: 90
Joined: Wed Nov 06, 2013 3:28 pm

Re: Problem with convergence

Postby jpfeifer » Sun Nov 10, 2013 8:28 am

Please try the recent snapshot. It will provide more explicit information. Moreover, put
Code: Select all
resid(1);

before steady to see the residuals of the equations. Then use economic intuition to inform your steady state values. For example, typically K>Y>C>I, with Y in most models being somewhere around 1 and C then being around 0.8. Your starting values are really poor, particularly for equation 2 and 3. I might be that those equations still have a mistake.
------------
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: Problem with convergence

Postby macroresearch123 » Sun Nov 10, 2013 6:50 pm

That's very helpful; normally I do not worry about initial conditions since for prior endeavors I have worked with much more well behaved functions.

I tried different initial conditions and the first three equations have residuals of infinity. Have you encountered such a problem before? One possibility is that the FOCs are improperly specified, but I have checked them twice; I will, nevertheless, check them a third time. Just for context, the "S" is environmental quality. This is a model I made that incorporates a CES between environmental quality, leisure, and consumption in preferences; firms use capital, labor (Cobb Douglas composite) and a CES between that composite and energy inputs.
macroresearch123
 
Posts: 90
Joined: Wed Nov 06, 2013 3:28 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests