Good evening,

I am writing to comment on a recent issue which occured to me when trying to calibrate a model suggested by Canova and Ravn (1998), which triest to describe how population dynamics, particularly migration flows, may affect the real variables. Please find attached herewith the mentioned paper, which clearly specifies all the equations and the steady state conditions describing the model. In such a sense, I am quite sure about the fact that steady state values can, and should, be found, especially for cases such as rho = 1.

When trying to run the code, the following error appears:

*Residuals of the static equations:*

*Equation number 1: h_e : 0.000000*

*Equation number 2: w_s : 0.000000*

*Equation number 3: 3 : -0.064331*

*Equation number 4: h_u : 0.000000*

*Equation number 5: y_u : 0.000000*

*Equation number 6: c_u : 0.000000*

*Equation number 7: k : 0.000000*

*Equation number 8: 8 : 0.000000*

*Equation number 9: 9 : 0.000000*

*Equation number 10: 10 : 0.000000*

*Equation number 11: 11 : 0.000000*

*Equation number 12: 12 : 0.000000*

*Equation number 13: y : -0.004707*

*Equation number 14: 14 : 0.251890*

*Equation number 15: z : 0.000000*

*Equation number 16: e : -0.518457*

*Equation number 17: N : 0.000000*

*Equation number 18: 18 : 0.000000*

*Equation number 19: N_s : 0.000000*

*Equation number 20: g_u : 0.000000*

*Equation number 21: N_u : 0.000000*

*Equation number 22: r : 0.000000*

*Equation number 23: gamma : 0.000000*

*Equation number 24: c : 0.000000*

*Equation number 25: y_s : 0.000000*

*Error using print_info (line 33)*

*The steadystate file did not compute the steady state*

*Error in steady (line 143)*

- print_info(info,options_.noprint, options_);*

*Error in crossing.driver (line 708)*

*steady;*

*Error in dynare (line 310)*

- evalin(‘base’,[fname ‘.driver’]);*

I have already corrected equation number 22, which was wrongly specified. Yet, I do not understand why the rest of equations containing nonzero residuals are incorrect. I attach below the mod file also.

248.pdf (805.5 KB)

crossing.mod (2.1 KB)

Thank you so much, in advance, for your answer and help,

Roger

The crossing helper function is missing.

Dear Mr. Pfeifer,

Thank you so much for your answer and help. Please find attached below the .m file containing the aforementioned helper funciton:

crossing_helper.m (301 Bytes)

Sorry for the inconvenience,

Roger

In your current setup, `e`

has a steady state of 1, not 0.

Dear Mr. Pfeifer,

Thank you so much for your answer. When assuming a steady state value of 1 for e the static equations lead to more residuals than before. I do not whether this may be useful, but, although e is modeled as an AR(1) process, the equation determining it does not contain a constant. I.e., e is modeled as: e = psi_e*(-1) + epsilon_e.

I have been able to make some progress (apparently) by trying to solve for the case rho = 0, where a closed form solution for all variables can be found. The static equations do not report residuals now (still, assuming e=0 in the steady state):

Residuals of the static equations:

Equation number 1: h_e : 0.000000

Equation number 2: w_s : 0.000000

Equation number 3: w_u : 0.000000

Equation number 4: h_u : 0.000000

Equation number 5: y_u : 0.000000

Equation number 6: c_u : 0.000000

Equation number 7: k : 0.000000

Equation number 8: 8 : 0.000000

Equation number 9: 9 : 0.000000

Equation number 10: 10 : 0.000000

Equation number 11: 11 : 0.000000

Equation number 12: z : 0.000000

Equation number 13: e : 0.000000

Equation number 14: N : 0.000000

Equation number 15: 15 : 0.000000

Equation number 16: N_s : 0.000000

Equation number 17: g_u : 0.000000

Equation number 18: N_u : 0.000000

Equation number 19: gamma : 0.000000

Equation number 20: c : 0.000000

Equation number 21: U_c : 0.000000

Equation number 22: r : 0.000000

Equation number 23: y : 0.000000

Equation number 24: 24 : 0.000000

Equation number 25: 25 : 0.000000

Equation number 26: 26 : 0.000000

Yet, the following error appears now:

By what I have been able to read and understand, such an error may be related to the Blanchard-Kahn condition. However, I would appreciate so much any type of guidance on how to solve such an inconvenient.

Thank you so much, in advance for your answer. Please excuse me for the inconvenience caused, I am new to Dynare and DSGE modeling.

Best,

Roger

Sorry,

Please find attached below the renewed script which I was talking about in the previous message. As it may be seen, it does not contain any helper function anymore:

perfect_complements2.mod (2.3 KB)

Excuse me again:

Just to make the interaction more effective: when calling the model_diagnostics command the following information appears:

Total computing time : 0h00m00s

model_diagnostics(M_,options_,oo_)

MODEL_DIAGNOSTICS: The Jacobian of the static model is singular

MODEL_DIAGNOSTICS: there is 2 collinear relationships between the variables and the equations

Relation 1

Collinear variables:

y

c

c_s

h_s

k

gamma

N_s

N_u

h_e

x

l_s

N

y_s

U_c

Relation 2

Collinear variables:

y

c

c_s

h_s

k

gamma

N_s

N_u

h_e

x

l_s

N

y_s

U_c

Relation 1

Collinear equations

1 2 3 4 5 6 9 13 15 16 17 18 22 23 24

Relation 2

Collinear equations

1 2 3 4 5 6 9 13 15 16 17 18 22 23 24

MODEL_DIAGNOSTICS: The singularity seems to be (partly) caused by the presence of a unit root

MODEL_DIAGNOSTICS: as the absolute value of one eigenvalue is in the range of ±1e-6 to 1.

MODEL_DIAGNOSTICS: If the model is actually supposed to feature unit root behavior, such a warning is expected,

MODEL_DIAGNOSTICS: but you should nevertheless check whether there is an additional singularity problem.

MODEL_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one

MODEL_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation

MODEL_DIAGNOSTICS: is missing. The problem often derives from Walras Law.

It looks to me as if the timing of capital is still wrong (and associated with this, the timing of the detrending). Usually, capital is a predetermined variable.