Hi, what is wrong with this model ? It finds the steady states but the following problem occurs:
[quote]Warning: Matrix is singular to working precision.
In sim1 at 128
In simul at 126
In gshock_percentage2 at 240
In dynare at 180
Warning: Matrix is singular to working precision.
In sim1 at 128
In simul at 126
In gshock_percentage2 at 240
In dynare at 180
Simulation terminated after 4 iterations.
Total time of simulation : 0.297
Error using sim1 (line 144)
Simulation terminated with NaN or Inf in the residuals
or endogenous variables. There is most likely something
wrong with your model.
Error in simul (line 126)
sim1;
Error in gshock_percentage2 (line 240)
simul();
Error in dynare (line 180)
evalin(‘base’,fname) ;[/quote]
I attach a new version of the mod file, which is better organized. Using model_diagnostics in the unstable version 2014-12-18, no obvious problems are detected.
As communicated several times, try to think about the economic intuition. Given the time you are trying to solve a model of this type, it is more likely that there is a fundamental problem rather than an easy Dynare issue. My hunch is that your current model setup does not feature an equilibrium at all and that is why Dynare does not find one. Have you tried easier versions of your model?
I have the same impression. I have solved the baseline model without constraints on nominal wage, so it is clear that the problems arise when introducing such constraint. Unfortunately, I cannot think of anything easier than that. I am simply setting a nominal wage adjustment rule, w_r, and imposing that w_t=max(w_r,w_eq). It could well be that w_eq is the problem. Do you have any suggestion ? Thanks.
As I said, try to make the model easier. Strip away any unnecessary features like e.g. capital or complicated utility functions. Then try to nest the flexible version and the sticky version with e.g. some wage adjustment cost. If the cost goes to infinity, you have perfectly sticky prices. Try to get some intuition if there is a threshold above which the model does not work or whether there generally is no equilibrium.
Even better: check the literature for the experience of other people with these types of models.
You should start from an easier model. Debugging this file is like searching for a needle in a haystack. The NaN comes from you putting resid before you define the initial values for the steady state. At that point in the code, all initial values are still 0.
I can only recommend trying to compute the steady state analytically. I have seen too many try to start from the Gerali et al 2010 starting values for the steady state after modifying the model and failing to compute the steady state numerically.