Page 1 of 1

problems with dynare++

PostPosted: Fri Apr 13, 2007 9:30 am
by wingfly
(1)I just run the example1.mod in dynare++, according to the instruction from the tutorial. But the exampl1_f.m always contains the following and thus this example1.m can not be used in matlab.


% hardwired constants
a0 = 0;
a1 = 1;
a2 = 1.#QNAN;
a3 = 1.1283792;

(2)when I try to find the steady states for another model, and I try to guess the steady states using the method at the end of the tutorial, but the above problem persists.
Thus is 1.#QNAN not recognized in matlab? Is there something wrong with my computer?

Best

what's more

PostPosted: Fri Apr 13, 2007 5:08 pm
by wingfly
Here is my model, but dynare++ always report

C:\dynare>dynare++ TaxLabor.mod
Caught Dynare exception: nlsolve.cpp:100 Initial guess does not yield finit residual in NLSolver:solve

Probably this problem is trial, but your kind advice on how to get the right deterministic steady states is appreciated.

PostPosted: Mon Apr 16, 2007 8:22 am
by wingfly
Now I run the program in Dynare and the steady state is solved. But this Ramsey problem seems to be indetermined:

>> dynare TaxLabor51.mod

STEADY-STATE RESULTS:

A 15
C 1.4008
initA 0.611234
K 15.7462
lmd 0.794806
N 0.244403
phi -0.635449
TauN 0.0988413
Z 8.53105e-010


??? Error using ==> print_info
Blanchard Kahn conditions are not satisfied: indeterminacy

Error in ==> stoch_simul at 50
print_info(info);

Error in ==> TaxLabor51 at 113
info=stoch_simul(var_list_);

Error in ==> dynare at 26
evalin('base',fname) ;

PostPosted: Sat Apr 21, 2007 5:07 pm
by MichelJuillard
For the first two questions, I still need to check by running the example.

For the third question, it may just turn out that your model, for this particular parameter values, don't satisfy BK conditions.

Best

Michel

PostPosted: Sun Apr 22, 2007 12:27 am
by wingfly
Thanks! But please excuse my not so good expression in English.
The problem with my model can be discussed later, and now I have a problem with the Dynare++ program.
I run the kp1980_1.dyn attarched in the files of downloaded dynare++, step by step to calculate the steady states since I fail to guess the right initial values. I did this according to the instructions in the dynare++tutorial.pdf, which is

7.4 Matlab Scripts for Steady State Calculations

on page 74. But the system always return the following message:

% hardwired constants
a0 = 0;
a1 = 1;
a2 = 1.#QNAN;
a3 = 1.1283792;

the problem is #QUAN can not be processed by the computer. I do not know what is wrong with it. Thanks again for your answer.

PostPosted: Thu May 03, 2007 3:02 pm
by OndraKamenik
Dear wingfly,

The error with strange identifier "a2 = 1.#QNAN;" is dynare++ bug. It appears only on windows. The reason is that MinGW (compiler used for dynare++ for Windows) implements printf() function yielding this strange string. This string cannot be swallowed by Matlab. The workaround is to change "1.#QNAN" to "NaN", which is understood by Matlab.

The bug is corrected in dynare++-1.3.4, which is going to be released soon. The bug fix is already in svn.

Sorry.

Concerning the solution of the steady state for Ramsey optimal problems: please, make sure, that the model has inherent mechanisms to identify steady state of policy variable(s). Then you can use the provided M files to locate the problem in non-existent steady state.

Ondra K.

PostPosted: Thu May 03, 2007 9:48 pm
by wingfly
Thanks! And it si true that the model that I use is indetermined.
Thank again