Page 1 of 1

Steady state convergence and homotopy

PostPosted: Sat Nov 16, 2013 7:46 am
by macroresearch123
Dear Dynare Assistants:

I apologize for this additional post over a related question that I asked last time -- the model still does not seem to be working. To ease the interpretation of my question, I attached a pdf of the optimization problem I am solving -- the social planner's problem. C is consumption, H is hours worked, E is energy, K is capital.

Fortunately, the steady state seems to be close to convergence. As you suggested, I type a residual command so that each time I run the program I see the residuals. They are quite small:

Equation number 1 : 0.031914
Equation number 2 : 0.015809
Equation number 3 : -0.0434
Equation number 4 : 0.61771
Equation number 5 : 0.16

However, it still does not complete! I tried homotopy, with the commands below, but it did not work; delivered an error that it could not proceed after the first step

homotopy_setup;
sigma_c, 0.5, 5.32;
sigma_h, 0.5, 0.02;
sigma_s, 0.5, 1.33;
end;

steady(homotopy_mode = 1, homotopy_steps = 50);

As always, I appreciate your advice and insight into the problem.

PS, is there an easy way to run the model many times over a series of possible parameter values, i.e. to test the state state under different parameter values of a tax?

Re: Steady state convergence and homotopy

PostPosted: Tue Nov 19, 2013 9:18 am
by jpfeifer
As always with steady state problems, try solving for the steady state by hand (or simplifying it as far as possible). You model seems like this is possible.

Re: Steady state convergence and homotopy

PostPosted: Tue Nov 19, 2013 3:39 pm
by macroresearch123
Because of nonseparability in consumption, labor, and environmental quality, it actually isn't (which is what initially led me to Dynare in the first place). Any alternative strategies? The FOCs in the code are simplified as much as possible (to my knowledge).

Re: Steady state convergence and homotopy

PostPosted: Tue Nov 19, 2013 7:35 pm
by jpfeifer
You could like at theNK_baseline.mod in the examples folder. It narrowed the problem in steady state down to one non-linear equation in labor and then used a solver to solve that equation in a steady state file.

Re: Steady state convergence and homotopy

PostPosted: Wed Nov 20, 2013 1:22 am
by macroresearch123
Thank you for the reference! Not to be a bother, but that file doesn't seem to be in the "examples" folder... I looked for it online too and for mention of it in the user manual. Could you post it? I first thought you might have been referring to bkk which is in the folder, although has "@#" in many places which I haven't seen before.

Re: Steady state convergence and homotopy

PostPosted: Wed Nov 20, 2013 9:54 am
by jpfeifer
The file is contained in the recent snapshot (Dynare unstable), not in 4.3.3. Alternatively https://github.com/DynareTeam/dynare/tree/master/examples