Blanchard-Kahn, Matlab vs Octave

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.

Blanchard-Kahn, Matlab vs Octave

Postby rrien » Sun Dec 06, 2009 5:38 pm

Hello,

I am trying to run a version of the Gali model with dynare 4.0.4 and octave 3.2.3 under Mac OSX Snow Leopard. I am using the binary package kindly provided by Christophe Cahn.

While the code works fine under Windows with Matlab R2009A, it raises a Blanchard-Kahn condition error under octave/Mac.

It seems that the eigenvalues are not all the same.

From Matlab:
Code: Select all
EIGENVALUES:
         Modulus             Real        Imaginary

      1.502e-016      -1.502e-016                0
             0.4              0.4                0
             0.4              0.4                0
             0.4              0.4                0
             0.4              0.4                0
          0.7908           0.7908                0
           1.022             1.02          0.07026
           1.022             1.02         -0.07026


From octave:
Code: Select all
EIGENVALUES:
         Modulus             Real        Imaginary

       2.471e-16        2.471e-16                0
             0.4              0.4                0
             0.4              0.4                0
             0.4              0.4                0
             0.4              0.4                0
          0.7908           0.7908                0
          0.8405           0.8405                0
           1.199            1.199                0


Does anyone know how I could solve this issue? I would really prefer to use octave if I have the choice. Many thanks!
Attachments
gali.mod
(1.45 KiB) Downloaded 117 times
rrien
 
Posts: 2
Joined: Sun Dec 06, 2009 4:37 pm

Re: Blanchard-Kahn, Matlab vs Octave

Postby SébastienVillemot » Mon Dec 07, 2009 11:38 am

Hi,

In this example, MATLAB is giving the right answer, and Octave a wrong answer.

I found the reason: it is due to the fact that your Dynare installation doesn't contain the MEX files for Octave. And without them, Octave returns wrong eigenvalues (in future releases, Dynare will fail in that case, to avoid misleading people).

So you can use Dynare 4.0.4 with Octave, but you need to compile MEX files. See: http://www.dynare.org/DynareWiki/BuildingDlls

Best,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Blanchard-Kahn, Matlab vs Octave

Postby rrien » Mon Dec 07, 2009 3:15 pm

Hello,

Thanks a million, it works just fine now!

I just followed the instructions to build the DLLs with build_octave.m.

Best,
rrien
 
Posts: 2
Joined: Sun Dec 06, 2009 4:37 pm

Re: Blanchard-Kahn, Matlab vs Octave

Postby ecastro » Fri Jan 16, 2015 4:44 pm

Hello,
I'm facing the same problem but with new versions of dynare (4.4.3) and Octave (3.8.2): running the same .mod file with Matlab and Octave, the steady state is identical but the eigenvalues are different (and the rank condition holds on matlab but fails on Octave). Would you know how to solve the problem so that Octave gets the right eigennvalues?
Thanks.
ecastro
 
Posts: 1
Joined: Fri Jan 16, 2015 1:50 pm

Re: Blanchard-Kahn, Matlab vs Octave

Postby jpfeifer » Fri Jan 16, 2015 7:33 pm

I would need to see 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


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 12 guests