Page 1 of 1

Confirming the cause of the problems we're experiencing

PostPosted: Sun May 15, 2011 10:19 am
by jon@uct
Hi. Thanks for taking the time to help out with this in advance. I really appreciate any constructive input that you could offer. I think I know the cause of the problem but I don't know enough about Dynare or MATLAB to be sure.

Some background (feel free to skip if you don't find it relevant): our masters macroeconomics class has been assigned the task of replicating the model in the paper by Bouzahzah et al. (2000). However, we've been thrown in the deep end since nobody in the class really knows how MATLAB or Dyanre work and we've received very little support from our department. We were given the code used by the paper's authors to compute an OLG model. However, there are no comments in the code and the class is really struggling to figure out what's going on.

The problem: After cleaning up some problems with the author's code, we've managed to compute the model but we keep getting the following output after the steady-state values are printed:

MODEL SIMULATION :

1 - err = 8.0074
Time of iteration :0.031
2 - err = 0.078765
Time of iteration :0.031
3 - err = 2.7668e-005
Time of iteration :0.031
4 - err = 9.5879e-012
Time of iteration :0.031

After some searching on the forums, I think that the problem might with the following line under the model's equation specification:

-DF*YY+DD(-1)-DD*MM*GR^PRM;

There is no '=' sign so I think that the problem is that there's basically an equation missing in the model specification. Unless I'm completely missing something, there's some information that's not being accounted for here. Could this be the problem?

I've attached the .mod file. Thanks again for your help.

Kind regards
Jonathan

Re: Confirming the cause of the problems we're experiencing

PostPosted: Mon May 16, 2011 8:27 am
by jpfeifer
The output is not an error message. Dynare solves a nonlinear system of equations numerically and tells you the precision the solution in the current step has. Hence, err = 9.5879e-012 roughly tells you that the solution is accurate up to the 12th decimal. The program does not crash. Rather, your simulation results are stored in the workspace, for each variable under its name. However, note that when executing simul several times in one workfile, each run overwrites the previous results.