0/0 eigenvalue problem

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

0/0 eigenvalue problem

Postby pawel » Fri Mar 02, 2012 1:41 pm

I'm using dynare 4.2.4 and get similar problems in the latest release of dynare++.

Bascially, I wanted to check if moving from a levels to a log-approximation would reduce the Euler equation residuals I'm getting. Since all my variables were positive I changed all occurrences of x (where x stands for an arbitrary variable name) to exp(x) and modified the SS block accordingly. That procedure leads the model to stop working (the modified SS works nicely). In particular Dynare++ reports:
Code: Select all
Blanchard-Kahn condition not satisfied, model not stable

which used to be the error in previous versions of dynare, but as of 4.2.4 I'm getting the following:
Code: Select all
One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than 1e-6)


Of course, I found the above surprising, as (to the best of my knowledge) the variables in which a model is written should have no impact on its local stability. To try and track the source of this error, I therefore started logging variables one by one and inspecting the model eigenvalues. Out of the 22 eigenvalues in my model 20 are unaffected by the transformations (as should be the case). However, two eigenvalues are not constant, and their values fluctuate somewhat. More specifically, for the original model I had:

    EIGENVALUES:
    Modulus Real Imaginary
    1.313e-016 -1.313e-016 0
    6.276e-015 6.276e-015 0

Then after logging one variable that changed to:

    EIGENVALUES:
    Modulus Real Imaginary

    2.053e-017 -2.053e-017 0
    2.282e-015 -2.282e-015 0

and a few variables down the road the whole thing suddenly stops working (and I get the errors mentioned above)... So my take on this is that dynare is picking up / carrying arround some numerical noise (i.e. these eigenvalues should for all practical purposes equal zero) which leads to very imprecisely computed eigenvalues (and ultimately either to errors in their computed values (which are reported as BK condition violations), or the 0/0 message and in effect a refusal to compute those).

So my question is whether the story sounds plausible and whether anybody can think of a way around the problem (somehow forcing dynare to truncate values after 12 decimal places, perhaps???).

Thanks in advance for your help, happy to post the codes if anyone thinks they may be helpful.
Pawel
pawel
 
Posts: 33
Joined: Fri Jan 05, 2007 11:16 am

Re: 0/0 eigenvalue problem

Postby jpfeifer » Fri Mar 02, 2012 3:12 pm

Hi, could you please post the mod-file.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: 0/0 eigenvalue problem

Postby pawel » Fri Mar 02, 2012 4:32 pm

Hi,

DPZ_phi1phi2phi4phi5.mod - no longer works.
DPZ_phi1phi4phi5.mod - still does work ok.

The only difference is (or should be) the fact that phi2 appears in logs in the first (but not second) file.

Please let me know if anything is unclear and thanks for your help.
Pawel

EDIT (03/03/2012): Files now removed, as problem has been solved below.
Last edited by pawel on Sat Mar 03, 2012 11:54 am, edited 1 time in total.
pawel
 
Posts: 33
Joined: Fri Jan 05, 2007 11:16 am

Re: 0/0 eigenvalue problem

Postby jpfeifer » Fri Mar 02, 2012 9:51 pm

For the model with phi2 in logs, Dynare complains:
model_diagnostic: the Jacobian of the static model is singular
there is 1 colinear relationships between the variables and the equations
Colinear variables:
phi2
Colinear equations
1 2 3 4 6 7 8 9 10 11 20 28

It could be that there is a numerical problem as phi2 has a steady state of 8e-17 and thus is close to 0 and you are now taking logs of approximately 0. However, before you accept this explanation, make sure there is no deeper issue involved. Such an issue could also involve the model in levels!
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: 0/0 eigenvalue problem

Postby pawel » Sat Mar 03, 2012 11:40 am

Thanks a lot jpfeifer!

As you rightly (and very politely) point out, I was being rather stupid: logging something that is zero, is hardly ever a good idea.

Undeniably I should have eyeballed the SS values to begin with (which I thought I had...). So if there are any lessons to be learnt from this, I guess, it's that sometimes problems with the steady state (which is what this was) can show up as errors in unexpected places. Which, btw., is not to say that the rest of the model is free of problems :wink:

The final thing that I find slightly surprising is that we're getting slightly different error messages, i.e. you don't seem to be getting the one I was:
One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than 1e-6).

Are you using a different version of dynare (I'm on 4.2.4) or is it perhaps some extra diagnostic command that's giving you yours (both check and stochsimul give me the above)?

Thanks again,
Pawel
pawel
 
Posts: 33
Joined: Fri Jan 05, 2007 11:16 am

Re: 0/0 eigenvalue problem

Postby jpfeifer » Sat Mar 03, 2012 11:45 am

I got the same error message, but used the (unfortunately yet undocumented) model diagnostics command:
Code: Select all
model_diagnostics(M_,options_,oo_)
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: 0/0 eigenvalue problem

Postby pawel » Sat Mar 03, 2012 11:48 am

Good to know - thanks a lot!
Pawel
pawel
 
Posts: 33
Joined: Fri Jan 05, 2007 11:16 am

Re: 0/0 eigenvalue problem

Postby cvdkwaak » Wed Nov 14, 2012 3:49 pm

Hi,

I got the same message (One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller
than 1e-6)). If I try to correct it in the way jpfeifer proposes (model_diagnostics(M_,options_,oo_)), I get the following message:

"Index exceeds matrix dimensions"

do you have an idea why this is still not working? And do you know whether documentation has become available on this command in the meantime?

Thanks
cvdkwaak
 
Posts: 2
Joined: Wed Nov 14, 2012 3:41 pm

Re: 0/0 eigenvalue problem

Postby pawel » Wed Nov 14, 2012 4:02 pm

Did you check your steady state values? In my case the problem ended up being there... (and I've had it once since, and again it was a problem with the SS).

Hope this helps,
p
pawel
 
Posts: 33
Joined: Fri Jan 05, 2007 11:16 am

Re: 0/0 eigenvalue problem

Postby yoyoNDHU » Wed Nov 21, 2012 8:05 am

hello~~I got same problem.
I try to find the real S-S value to be the initial value
but still have the same problem...
When I use "model_diagnostics(M_,options_,oo_)"
Dynare show:
The following endogenous variables aren't present at the current period in the model:
ke
kes
model_diagnostic: the Jacobian of the static model is singular
there is 3 colinear relationships between the variables and the equations
Relation 1
Colinear variables:
ch
L
I
ce
omn
k
ke
w
p
ph
phs
chs
Ls
Is
ces
omns
ks
kes
ws
ps
pf
pfs
s
Relation 2
Colinear variables:
ch
L
I
ce
omn
k
ke
w
p
ph
phs
ps
pf
pfs
s
Relation 3
Colinear variables:
ch
L
I
ce
omn
k
ke
w
p
ph
phs
ps
pf
pfs
s
Relation 1
Colinear equations
1 14 28 29 36 37 38

Relation 2
Colinear equations
1 14 28 29 36 37 38

Relation 3
Colinear equations
1 14 28 29 36 37 38
---------------------------
what's the meaning of that?
reation1=relation2=relation3??
Can someone teach me? Thanks!!!!
yoyoNDHU
 
Posts: 31
Joined: Tue Sep 04, 2012 7:07 am

Re: 0/0 eigenvalue problem

Postby cvdkwaak » Wed Dec 05, 2012 11:07 am

it was indeed steady state values that could not be uniquely identified by Dynare, program works now.
cvdkwaak
 
Posts: 2
Joined: Wed Nov 14, 2012 3:41 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 5 guests