Problem With Rank Condition in Dynare

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.

Problem With Rank Condition in Dynare

Postby ebuffie » Tue Jul 20, 2010 6:22 pm

I and co-authors at the IMF have run into a peculiar problem with Dynare not announcing that the rank condition is violated in a deterministic model where debt grows explosively. The trivial examples in the attached files illustrate the problem. In trial_2, tax revenues decrease for five years and then return to their original level. This sets off explosive growth in the debt. Strangely, Dynare does not announce that the rank condition is violated (1 eigenvalue with modulus greater than unity vs. 0 forward-looking variables). Instead we get the perplexing message "Improper assignment with rectangular empty matrix." More puzzling yet, when we run a stochastic version of the model (trial_1), Dynare does announce that the rank condition fails to hold. But Dynare linearizes around the deterministic steady state in the stochastic program. So why do we get the message we want in this case but not in the deterministic program?
In the more complicated model we are analyzing, the message that the rank condition fails would help us determine when fiscal adjustment is too slow to stabilize the path of debt. In unstable scenarios, however, Dynare sends out the message that it is struggling with an ill-conditioned, nearly singular matrix before aborting the run. Is this broadly similar to the message in the example that it has encountered an empty rectangular matrix?

trial_1.mod
(345 Bytes) Downloaded 87 times
trial_2.mod
(277 Bytes) Downloaded 76 times
ebuffie
 
Posts: 2
Joined: Tue Jul 20, 2010 5:54 pm

Re: Problem With Rank Condition in Dynare

Postby MichelJuillard » Fri Jul 23, 2010 9:10 am

There are two issues with these examples. Both related to bugs in Dynare.

1) there is a bug in the check command when used in a deterministic setup (a *.mod file with simul and not stoch_simul)
2) Dynare doesn't compute deterministic simulation of purely backward models.

I corrected the bug related to 1) and added an explicit error message in the case of 2). The corrections will be available in tomorrow's unstable version.

Eigenvalues are computed with the check command and the user has the responsibility for checking the eigenvalues before attempting a deterministic simulation. This can not be included automatically in simul, because with proper initialization of the trajectory (using initval_file for example), it is possible to simulate models with a balanced growth path where the criteria for explosive eigenvalues would not be 1.0

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Re: Problem With Rank Condition in Dynare

Postby ebuffie » Mon Jul 26, 2010 7:30 pm

Michel,

Thanks for clearing this up. Could you answer two other questions for us:

1. While we wait for the fix in a future stable version of Dynare, is there a command that allows us to extract the linearized coefficient matrix Dynare uses to evaluate the rank condition? If there is, we could feed the matrix into a separate Matlab program to compute the eigenvalues of the system and check the rank condition.

2. Suppose the model is unstable for T periods and then a regime change occurs that stabilizes the system. Does Dynare evaluate the rank condition at the initial steady state (where the condition does not hold) or at the new steady state (where it does hold)?

All of this is part of a project to build a better framework for debt sustainability analysis at the Fund. Dynare has proven to be a remarkably versatile and powerful tool, but some of the inner workings of the genie remain mysterious to us.

Best regards,

Ed
ebuffie
 
Posts: 2
Joined: Tue Jul 20, 2010 5:54 pm

Re: Problem With Rank Condition in Dynare

Postby SébastienVillemot » Thu Aug 19, 2010 2:42 pm

ebuffie wrote: 1. While we wait for the fix in a future stable version of Dynare, is there a command that allows us to extract the linearized coefficient matrix Dynare uses to evaluate the rank condition? If there is, we could feed the matrix into a separate Matlab program to compute the eigenvalues of the system and check the rank condition.


It's probably easier to use the snapshot in the meantime, since the bug is fixed there.

2. Suppose the model is unstable for T periods and then a regime change occurs that stabilizes the system. Does Dynare evaluate the rank condition at the initial steady state (where the condition does not hold) or at the new steady state (where it does hold)?


It depends: if you put the "check" after the "initval" block, it will verify the condition at the initial steady state. If you put it after the "endval" block, it will verify it at the terminal condition. Note that you can put "check" at both places.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests