Strange Bug

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.

Strange Bug

Postby hewei2004 » Mon Feb 13, 2012 7:57 pm

Hi,

It seems that the order in which you write down equations matters.

For example, in the attached RBC1.mod

If you move the following four lines:

x = rho*x(-1) + ex;
da = mu + x(-1) + ea;
dc = ca - ca(-1) + da;
di = ia - ia(-1) + da;

Move them to the beginning of the model, versus the end, or take one of the 4 equations and move it around. Switching order seems to change the value of fixed point interest rate a lot, as is evident in the following matlab commands:
load('RBC1.mat'); dyn_ss(dyn_i_rk)

This is very strange. Why should the order in which the equations are entered in the model section matter. I use dynare++ 4.2.4 linux, order=2. The same phenomenon is also in dynare++ 4.2.2 windows
Attachments
RBC1.mod
(1.39 KiB) Downloaded 62 times
hewei2004
 
Posts: 40
Joined: Thu Feb 09, 2012 1:07 am

Re: Strange Bug

Postby SébastienVillemot » Wed Mar 14, 2012 2:56 pm

I think that your model is a pathological case.

When I run it through Dynare 4.2.4 (not Dynare++), the "check" command returns the following error message:
Code: Select all
error: One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than 1e-6)
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Strange Bug

Postby hewei2004 » Sun Mar 18, 2012 7:16 pm

May I know what I can do to fix this problem?
I do not want to change the parameter values. Thank you.
hewei2004
 
Posts: 40
Joined: Thu Feb 09, 2012 1:07 am

Re: Strange Bug

Postby jpfeifer » Mon Mar 19, 2012 8:22 am

It suggests that there is something fundamentally unsound in your model in its current configuration. There may be a typo somewhere, the parametrization may be infeasible but numerically borderline stable, or your model might be wrong (which I don't hope). Just from the Dynare output it is hard to judge.
------------
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: Strange Bug

Postby hewei2004 » Wed Mar 21, 2012 9:57 pm

Hi,
The model is correct. The problem is with the following parameter:
beta = 0.9975
It is borderline stable.

If I change beta=0.95, now it is very stable, not borderline stable.

Is there a way to reparameterize things to scale up the eigenvalue so it is not less than 1E-6, Is it just a problem of scaling it seems ?
hewei2004
 
Posts: 40
Joined: Thu Feb 09, 2012 1:07 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests