Impossible to find steady state in Ireland 2003

Yes, you should do that.

The Dynare reports that some variables are undefined, if I add the steady state equations that I know. When I set the missing variables to initial values, large sum of residuals is the output again. Is there a mistake in my steady_state_model block?

Model.mod (2.3 KB)

Yes, there are various errors. Your code must be sequentially executable. For example, you are using lamb before it is set and the equation for c has c on both sides.

Thanks for your advice, program finally showed some improvement, although it still reports an error:

resid: The initial values for the steady state of the following variables are complex:
c
m
lambd
ksi

and

error: The steadystate file did not compute the steady state

Model.mod (2.3 KB)

There must be something wrong with your formula for lambda to result in something complex.

I have checked two extra times formula for lambda, and it seems to be OK. However, in the denominator, I have computed power (1+alpha)/(1-alpha) when I was manually solving for steady state and not 1/(1-alpha). I trusted the authors and used their version, however the Dynare still reports same problem even if I change it to my version. I don’t know if it’s practice in academic world to include some obvious traps to force students to compute correct solutions for steady states themselves and not copy it from papers, as I’ve found several “errors” like this in the PhD dissertation.

I’m sending full Dynare output.

Dynare output.txt (2.2 KB)

  1. Unfortunately, typos and coding errors are extremely common. This is clearly not intended. You can fail a PhD thesis for things like this.
  2. Because of that, it’s typically necessary to at least cursory check the correctness/plausibility of the paper you are working with.
1 Like

I thought so indeed. I have checked the steady state solutions and the rest is correct. Could I be having problem in model block?
Model.mod (2.3 KB)

Usually, mistakes can be both in the steady state and the model equations. But if you arrive at complex values in the steady state computations, then there must be a mistake in these computations.

I checked the steady state equations and they seem correct. I derived the terms using the model equations put in a steady state. Is there a way to find the incorrect part of the formula for lambda?

Also, I noticed that for variables x, a, e, z, v and tau there’s no value determined in the steady state equations, so I set their respective values to the initial value that I assume based on empirical data. Is this a correct way? Namely, I’ve seen a possibility to run a numerical solver with helper function “fsolve” for variables which are determined using parameters which aren’t defined within the steady state equations.

  1. In the computation for lambda, the part (r/(r-1))^(gamm-1) is the problem. The base is negative.
  2. You cannot numerically determine something that is not endogenously determined. It’s a conceptual not a numerical problem.

I encountered a problem at constructing the steady state model sequentially. There is a circular problem, as equation for c includes variable r, which itself indirectly requires c (c enters equation for tau, which enters pi, which enters r).

Model.mod (2.5 KB)
dsge_steadystate_helper.m (187 Bytes)
dsge_steadystate_helpera.m (184 Bytes)
dsge_steadystate_helpere.m (198 Bytes)
dsge_steadystate_helperv.m (184 Bytes)
dsge_steadystate_helperx.m (184 Bytes)
dsge_steadystate_helperz.m (198 Bytes)

In that case, you need to solve a simultaneous equation system and should use a full steady_state- file to solve the system.

I have written a full steady state file, but after adding the helper files, Dynare now reports error:

error: ‘rhoe’ undefined near line 3 column 20

rhoe is obviously defined as parameter in the original file.

Model_steadystate.m (1.2 KB)
Model.mod (1.7 KB)
dsge_steadystate_helper.m (194 Bytes)
dsge_steadystate_helpera.m (186 Bytes)
dsge_steadystate_helpert.m (176 Bytes)
dsge_steadystate_helperv.m (184 Bytes)
dsge_steadystate_helperx.m (184 Bytes)
dsge_steadystate_helperz.m (201 Bytes)

You forgot to pass it as an input argument:

e=dsge_steadystate_helper(e0);

Thank you, I added input arguments, but now Dynare reports “epsilone” as undefined, although it’s defined in varexo block. Another question, can I name helper functions using different suffixes e.g. dsge_steadystate_helperx and dsge_steadystate_helperz?

Model_steadystate.m (1.2 KB)

Why is an exogenous shock the input of the steady state routine? In steady state, it will be 0.

I tried changing the function of the helper file to a one that doesn’t contain exogenous variables, but now Dynare reports an endogenous variable to be undefined too:

error: ‘m’ undefined near line 11 column 30

Model.mod (1.7 KB)
Model_steadystate.m (1.2 KB)
dsge_steadystate_helper.m (170 Bytes)
dsge_steadystate_helpera.m (167 Bytes)
dsge_steadystate_helpert.m (176 Bytes)
dsge_steadystate_helperv.m (166 Bytes)
dsge_steadystate_helperx.m (165 Bytes)
dsge_steadystate_helperz.m (182 Bytes)

I am not sure what you are doing here. In

e=dsge_steadystate_helper(e0,m,c,r,gamm);

where is the steady state for m supposed to come from? You did not set it.

I added steady state values to the steady state file. I also made some assumptions that I’m not sure are correct:

In the model file, I use notation like var_ss to denote a steady state value, but in the helper functions and steady state file I’ve followed other examples and used var0 notation, and I solved this by simpy equationg var_ss=var0

Additionally, functions in helper files use logarithms of lagged shock variables, which are both reported as error (logarithms and lags). I solve this by substituting logarithms of lags by new variables, defined as scalars (approximations). However in one case, even lagged endogenous variable enters an equation as m/m(-1) which I also simpify to m/m as I’m assuming all this happens in steady state.

Now Dynare reports d variable as undefined, even though it doesn’t enter the steady state file or any of the helper files.

Model.mod (1.7 KB)
Model_steadystate.m (1.3 KB)
dsge_steadystate_helper.m (170 Bytes)
dsge_steadystate_helpera.m (223 Bytes)
dsge_steadystate_helpert.m (164 Bytes)
dsge_steadystate_helperv.m (159 Bytes)
dsge_steadystate_helperx.m (178 Bytes)
dsge_steadystate_helperz.m (175 Bytes)