Page 1 of 1

Solving model with CES adjustment costs

PostPosted: Sat Jun 17, 2017 5:21 pm
by fochan
I am trying to solve a model (attached) with a Cobb-Douglas production function featuring DRS. The firm produces output using two inputs to production (k and j) which I am thinking of as physical capital and spare parts / inventory. I also have labor in my full model and some other features but have taken them out for the purpose of isolating the computational problem I am facing. Each firm faces an aggregate shock (x) and a firm-specific shock (z). To try and solve the problem I normalize the amount of spare parts in my economy (j) to 1, numerically solve for some steady-state values, and then try to solve the model in dynare++.

There is some complementary between inventory and spare parts / inventory which I model with a CES function. The more spare parts / inventory a firm has on hand, the lower the adjustment costs it faces when making physical investments. The matlab file to set the parameters is attached (base.m), including the file I use to find some of the steady state values (steady.m). I have also attached a copy of the mod file the code creates (stripped_down.mod).

After a lot of taking out various parts of the model, I have found the following problem. The problem I am having is when the production function features slightly decreasing returns to scale (xi=0.98 say) I get the following error:
Caught Dynare exception: dynare3.cpp:172: Could not obtain convergence in non-linear solver

As I decreasing the returns to scale (xi=0.70 say) I get no error and the code runs. However, the solution with xi=0.70 is empirically unrealistic. I do not think my economy is terribly non-standard, so I'm not sure why dynare is having trouble finding a solution with slightly decreasing returns to scale. Is there any thing I am doing wrong with this stripped down version of the model to create the problem I am facing, and is there any way to solve the problem?

Any help or insights you could provide is much appreciated.

Thank-you for your help.

Re: Solving model with CES adjustment costs

PostPosted: Wed Jun 21, 2017 8:59 pm
by jpfeifer
Is there a particular reason for using Dynare++ instead of Dynare? The latter is a lot easier to debug.

Re: Solving model with CES adjustment costs

PostPosted: Thu Jun 22, 2017 2:05 am
by fochan
No, there is no particular reason. I started using Dynare++ during a course in macroeconomics and have continued to use it out of force of habit.

I will try switch to Dynare and re-estimate the model. Is there any output of interest Dynare produces that can help me to debug? Furthermore, are there any commands I should enter when solving to the model to aid debugging?

Thanks for your help.

Re: Solving model with CES adjustment costs

PostPosted: Thu Jun 22, 2017 8:07 am
by jpfeifer
Dynare should by default provide more informative messages. You need to go from there and see where it leads you.