Problem with eigenvalues

Attached is a mod file of a simple rbc model. As i run the model, I am getting the following error

Error using print_info (line 54)
One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than
1e-06!

Is there a problem in the way I am writing the exogenous variable equations. Any help is appreciated.rbc_st.mod (6.5 KB)

Hi steve_1983,

More than with the exogenous processes, model_diagnostics indicates the issue might be related with redundant equations and aggregation.
For example, that the bond market clears, like your equation 16 states:
B = 0;
is usually implied by the agent’s first-order conditions and the assumption of a balanced government budget.
See also my answer at Generalized Schur (QZ) failed and other useful answers on this topic on the forum.

>> model_diagnostics(M_,options_,oo_)
MODEL_DIAGNOSTICS:  The Jacobian of the static model is singular
MODEL_DIAGNOSTICS:  there is 2 colinear relationships between the variables and the equations
Relation 1
Colinear variables:
c     
c_h   
c_r   
k     
w     
b     
lambda
mu    
zi    
y     
m     
cost  
tr    
mf    
r     
inv   
Relation 2
Colinear variables:
c     
c_h   
c_r   
k     
w     
b     
lambda
mu    
zi    
y     
m     
cost  
tr    
mf    
r     
inv   
Relation 1
Colinear equations
    12    14    15    16    18    19    21
Relation 2
Colinear equations
    14
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.

@cmarch Thank you so much for reverting back. As no of equations have to be equal to no of unknowns, I added the B=0 equation. How do I overcome this problem of shortage of equations.

For example pi remains undetermined in this model. There is no equation for pi.How do I overcome that?

That the number of equations and number of endogenous variables be equal is a necessary, yet not sufficient condition for the Jacobian to be full-rank. All equations need to be independent, i.e. each of the them must contain non-redundant information about the variables of the model. If you are short of meaningful equations, you need to go back to your model and ask yourself questions like: Did I specify all of the relevant first-order conditions? Do they imply an equilibrium in this market? If this and that market are in equilibrium given the equations I wrote, is it really needed that I also specify this aggregation condition? The problematic equations identified by model_diagnostics are a good starting point :slight_smile:. Again, see my answer at Generalized Schur (QZ) failed and other useful answer on this on the forum.

For example, pi remains undetermined in this RBC model. There is no equation for pi. How do I overcome that?

You are having a problematic complementary slackness condition in your model. That is a problem for perturbation approaches. The equation

(n_bar-n)*(w-eta*w(-1))=0;

will always be 0 in steady state in all directions. In particular, w-eta*w(-1) is always 0 given that you set eta=1

Yes, it is the downward nominal wage rigidity slackness condition. Is there a way to deal with this. Because for developing countries eta is generally one.

The complementary slackness condition introduces a fundamental non-differentiability into your model. You cannot solve this with perturbation techniques, i.e. stochastic simulations.

I understand now. In order to still retain some amount of rigidity, I changed the slackness condition into
w=eta*w(-1), with eta assumed to be 1

Now when i run the model, it says

There are 8 eigenvalue(s) larger than 1 in modulus
for 6 forward-looking variable(s)

The rank condition ISN’T verified!

Error using print_info (line 42)
Blanchard Kahn conditions are not satisfied: no stable equilibrium

Where am I going wrong?demon_2019.mod (8.5 KB)

Check your timing. In particular the Euler equations seem to be wrong. The capital return is not known in advance while the bond return usually is. Also note that the CS condition you now use is still wrong. The type of problem you are solving either needs to be solved using perfect foresight or with global solution techniques.

Thank you! Is there a guide (as good as dynare) to learn how to use global techniques or perfect foresight (and how to code them) to get solutions for such models. Appreciate your help.

I modified the model and now I am getting impulse responses in line with economic theory. But I still had a question about the impulse responses. I have observed that the impulse responses in my case often breach the horizontal axis and move into the negative quadrant. While in most papers they converge to the x axis. For example for a variable like consumption, why would it move into negative territory. If it is change in consumption, I can still understand. But all my variables are in levels. Where am i going wrong.dem2_2019 .mod (8.7 KB)

Sorry, but I only get a 0 IRF when running your code.
Also, regarding global solution techniques, you might want to look at Schmitt-Grohe/Uribe’s replicated files to their JPE paper with downward nominal wage rigidities.

Sorry about that. I have uploaded the correct file now.dem2_2019 .mod (8.7 KB)

You have c_r and c_h moving into different directions. Without knowing the model my hunch is that this drives the movement of c.

I have tried to resolve some earlier issues with the model. Now when i run the model, a new variable is getting created AUX_ENDO_LEAD 107 with a value of 0.1545. Can anyone help me with this? Why is it getting created and how should i solve the model now. The moddem_2020_wthprices.mod (7.6 KB) file is uploaded.

As described in the Dynare manual, a model with variables of a lead>1 are transformed into models with only one lead by introducing auxiliary variables. That is nothing to worry about and usually nothing you have to concern yourself with.

I am wondering why I am still facing problems with this model. I am not able to identify.

The steady state values are correct. Timing seems okay. Model diagnostics yields nothing

model_diagnostics(M_,options_,oo_)

SOLVE: maxit has been reached
model diagnostic can’t obtain the steady state

Where I am going wrong. By looking at the residuals, it seems the y (output) equation is causing problems which in turn is causing problems in return on capital ® and wages (w). But i am unable to point out why there is a problem with y. It takes the correct value in steady state. Appreciate any help.dem_2020_wthprices.mod (7.6 KB)