same code different versions

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.

same code different versions

Postby maddy » Fri Apr 03, 2009 6:20 pm

Hi,
I am able to run my program in version 3 when the order is 1. When I try to set order = 2, I get the following error:

??? Invalid MEX-file 'C:\....\dynare_v3\matlab\gensylv.dll': The specified procedure could not be found.

.
Error in ==> dr1 at 443
ghxx = gensylv(2,A,B,C,D);

Error in ==> resol at 56
[dr,info] = dr1(dr,check_flag);

Error in ==> stoch_simul at 47
[dr_, info] = resol(ys_,0);

Error in ==> mymodel at 118
info=stoch_simul(var_list_);

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

When I switched to Version 4, I cannot run the same program (code attached). Where am I going wrong?

Thanks,
Maddy
Attachments
mymodel.mod
(891 Bytes) Downloaded 64 times
maddy
 
Posts: 3
Joined: Fri Apr 03, 2009 6:12 pm

Re: same code different versions

Postby StephaneAdjemian » Sat Apr 04, 2009 11:41 am

Dear Maddy,

For dynare version 3, I don't know your platform and your version of matlab but the problem may be that your gensylv dll is outdated (I had this problem recently)... Remove this dll and replace it by the file gensylv.dll or gensylv.mexw32 distributed with dynare version 4 (4.0.3)

For dynare verion 4, I can't find the steady state... Even if I initialize with the one found with dynare version 3 (actually the steady state given by dynare_v3 is not very good, the residuals of the static equations are not exactly zero). Don't you have an analytical expression for the steady state?

Best,
Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: same code different versions

Postby maddy » Mon Apr 06, 2009 5:53 pm

Thanks, I was able to solve the problem of order =2 by copying the file from Version 4.
I face the same problem of not finding the steady state in Version 4. I have the ratio of steady state variables analytically - I don't know how to use this to find the right steady state values.

Maddy
maddy
 
Posts: 3
Joined: Fri Apr 03, 2009 6:12 pm

Re: same code different versions

Postby StephaneAdjemian » Mon Apr 06, 2009 6:52 pm

If you are able to obtain epression for steady state ratios it means that you can concentrate the problem. For instance, if you can express the ratio of Y and K as a function of deep parameters, say f(\theta), then you can replace Y by K*f(\theta). You can do this in the steadystate file associated to your mod file, and call a newton-like algorithm for the remaining variables.

Best,
Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: same code different versions

Postby maddy » Mon Apr 06, 2009 10:34 pm

Thanks again for your message! I was hoping to find an example of writing the steady state in the dynare user guide, but it is to be added shortly. Could you give me an example of how I can call the steady state? These are the ss ratios for my model.

m = (((1/ALPHA)*(1/BETA-1+DELTA))^(1/1-ALPHA))*k
c = ((1/ALPHA)*(1/BETA-1+DELTA)-((1/ALPHA)*(1/BETA-1+DELTA))^(1/1-ALPHA)-DELTA)*k
maddy
 
Posts: 3
Joined: Fri Apr 03, 2009 6:12 pm

Re: same code different versions

Postby StephaneAdjemian » Tue Apr 07, 2009 7:26 am

You'll find an example on the forum here.

Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 11 guests