pound lines again

As Dynare 4 is now the main version, this forum is now closed. Please, post
on the Dynare Help forum
Forum rules
As Dynare 4 is the current Dynare version, there forum is now close. Post new question in the Dynare Help Forum.

pound lines again

Postby OndraKamenik » Thu Aug 03, 2006 12:30 pm

Michel,

I have 12 pound lines at the top of a model section, and 70 variables/equations. The _static.m file initializes g1 matrix as 70x70, but starts writing at only 13th line, and references 82nd line. This produces a Matlab error.

It seems, that the number of pound lines is not subtracted from an equation index when writing g1 matrix. Forming residual is correct.

thanks for considering this bug report

best

Ondra K.
OndraKamenik
 
Posts: 73
Joined: Mon Dec 20, 2004 8:32 am

Postby Guest » Fri Aug 04, 2006 7:28 am

Thanks Ondra,

I will correct it in the next days.

Best

Michel
Guest
 

Postby MichelJuillard » Thu Aug 10, 2006 1:58 pm

I believe that the bug with the pound sign (#) instructions is now corrected. It is checked in SVN and should be available in tomorrow snapshot for version 4.

Best

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

Postby ckamps » Tue Nov 07, 2006 12:43 pm

Dear Michel,

the problem with the pound (#) sign in Dynare 4 seems to persist. I use revision 1008, which was posted at the end of October.

I get the following error message (in a window):
dynare_m.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

And in the Matlab command window it says:
??? Undefined function or variable 'ireland_loglin'.

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


The model works fine in Dynare 3 and also in Dynare 4 if I omit the lines with # sign (auxiliary parameters) in the model declaration.

Kind regards,

Christophe
ckamps
 
Posts: 5
Joined: Wed Mar 22, 2006 4:37 pm

Postby MichelJuillard » Tue Nov 07, 2006 1:51 pm

Dear Christophe,

can you please post the *.mod file?

Thanks

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

Postby ckamps » Tue Nov 07, 2006 2:27 pm

The file is attached now.

This is a (log-)linearized version of the Ireland model. It works fine in Dynare 3 but the pound lines cause problems in Dynare 4.

On my PC the nonlinear test files ireland.mod and ireland1.mod included in the SVN versions of Dynare 3 and 4 do not work because Dynare is unable to solve for the steady state (convergence problems).

Many thanks,

Christophe
You do not have the required permissions to view the files attached to this post.
ckamps
 
Posts: 5
Joined: Wed Mar 22, 2006 4:37 pm

Postby MichelJuillard » Tue Nov 07, 2006 3:01 pm

Can you update again? The current SVN version is working for me.
Are you recompiling for Max OS/X or are you using the provided matlab/dynare_m.exe ?

Best

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

Postby ckamps » Tue Nov 07, 2006 3:55 pm

I have downloaded the latest version. Yet, the problems are the same. I still get the error messages I copied into my first message when I run ireland_loglin.mod.

Also the nonlinear example files still do not work, again because of convergence problems in the calculation of the steady state.

I am not sure I understand your last question. I would guess I am using matlab\dynare_m.exe.

Christophe
ckamps
 
Posts: 5
Joined: Wed Mar 22, 2006 4:37 pm

Postby MichelJuillard » Tue Nov 07, 2006 9:08 pm

The error message that you indicated means that the parser that makes *.m files from your *.mod files fails to execute. This program is matlab/dynare_m.exe

Are you updating via SVN (using cygwin or Tortoise) or are you downloading the snapshot for Dynare v4?
If it is the later, my last changes will only be available tomorrow.

I am unable to reproduce the problem that you are encountering. Please, do the following in Matlab:

>>which dynare

does the answer points correctly to the latest version that you downloaded?
does dynare_m.exe is dated November 7 and has 1 081 825 bytes?

Which version of Windows are you using?

Kind regards

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

Postby ckamps » Wed Nov 08, 2006 7:02 am

Thanks a lot, Michel.

I installed SVN revision 1048 and now ireland_loglin.mod works fine with the pound lines, while with yesterday's snapshot version it did not work.

One last question:
Do the test files ireland.mod and ireland1.mod included in the dynare folders ...\tests\pi2004 work fine on your PC? On mine, regardless of the dynare 4 version I use, I get the following error message:

SOLVE: maxit has been reached
??? Error using ==> steady_
STEADY: convergence problems

Error in ==> steady at 13
steady_;

Error in ==> ireland1 at 189
steady;

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


Many thanks,

Christophe
ckamps
 
Posts: 5
Joined: Wed Mar 22, 2006 4:37 pm

Postby abscissaordinate » Sat Sep 20, 2008 4:05 pm

I am working on a log-linearized model where steady-state values of the endogenous variables show up in the model declaration step. My model is such that some of these steady-state values need to be solved using a numerical solver.

It appears that Dynare 4 does not like functions beyond the standard addition, subtraction, log, square root, etc., so calling a function I wrote to compute the steady-state values is out of question. For instance, add

# blah = max([1,3,5]);

to your model step you would see that Dynare does not like it.

Has anyone here experienced the same or a similar issue? Any suggestion or ideas on how to get around this would be greatly appreciated!

Thanks in advance for your time!
abscissaordinate
 
Posts: 15
Joined: Wed Nov 14, 2007 2:07 am

Postby SébastienVillemot » Mon Sep 22, 2008 8:29 am

Hi,

In Dynare v4, the set of authorized functions inside the model block is limited to standard functions (arithmetic operators, sqrt, log, exp, trigonometry...). This is due to the fact that in Dynare v4 we compute analytical derivatives of the model, while in Dynare v3 we were only computing numerical derivatives. Therefore, we need to know the analytical derivative of any function used in the model block.

In future releases of Dynare, we will introduce the possibility of using arbitrary functions in the model block by allowing the user to provide its first (and possibly second) derivatives.

Also note that there already exist a "max" function, but which only accepts two arguments. In your case you could write:
# blah = max(a, max(b, c));

Best

Sébastien
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Postby abscissaordinate » Mon Sep 22, 2008 3:21 pm

I see. Thank you for the response!
abscissaordinate
 
Posts: 15
Joined: Wed Nov 14, 2007 2:07 am


Return to Dynare version 4

Who is online

Users browsing this forum: No registered users and 2 guests