from Dynare v3 to Dyanre v4.0.3

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.

from Dynare v3 to Dyanre v4.0.3

Postby winifred » Tue Jun 09, 2009 1:02 pm

I downloaded the version 4. I tried this new version with the file which is able to run in version. However, version 4 couldn't run the end part of the file which has the codes:

statistic1 = 100*sqrt(diag(oo_.var(1:10,1:10)))./oo_.mean(1:10);
table('Relative standard deviations in %',strvcat('VARIABLE','REL. S.D.'),lgy_(1:10,:),statistic1,10,10,4)


And Dyanre version 4 showed the error information:

??? Error using ==> rdivide
Matrix dimensions must agree.

Error in ==> model0_hansen at 122
statistic1 = 100*sqrt(diag(oo_.var(1:7,1:7)))./oo_.mean(1:7);

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


When I installed version 4, I then go to Matlab/file/set path, add folder: C:\dynare_v4.0.3\matlab, and delete C:\dynare_v3. After running my personal file, there are two paths automatically in the set path, they are: C:\cynare_v4.0.3\matlab\AIM and C:|dynare_v4.0.3\matlab\..\mex\2007a. Is this normal?

I did not change any codes in the file. Just directly use the same file which works in version 3 and then it doesn't work in version 4 now.

Please give me suggestion, thank you.
winifred
 
Posts: 12
Joined: Tue Oct 21, 2008 10:02 am

Re: from Dynare v3 to Dyanre v4.0.3

Postby StephaneAdjemian » Tue Jun 09, 2009 2:08 pm

Hi, the reported error message is inconsistent with the quoted code (in the quoted code you have oo_.mean(1:10) but in the error message I read oo_.mean(1:7))... Are you sure u are running the right mod file?

The second line won't work with Dynare v4, because we do not use lgy_ anymore to store the names of the endogenous variables. You have to use M_.endo_names instead.

Depending on your matlab version, Dynare automatically adds some subfolders in the path.

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: from Dynare v3 to Dyanre v4.0.3

Postby winifred » Tue Jun 09, 2009 3:42 pm

Thanks for your quick reply.

About the code I posted : oo_.mean(1:10) and oo_.mean(1:7), I am sorry that I did posted error here. As I tried two files in case one file is not enough to show where is the error from (i.e. from the version installation or from others). Therefore, I mentioned the problem again:

[this is my codes]
statistic1 = 100*sqrt(diag(oo_.var(1:10,1:10)))./oo_.mean(1:10);
table('Relative standard deviations in %',strvcat('VARIABLE','REL. S.D.'),lgy_(1:10,:),statistic1,10,10,4)


[Dyanre version 4 showed the error information]
??? Error using ==> rdivide
Matrix dimensions must agree.

Error in ==> model2_DivDebtTax at 136
statistic1 = 100*sqrt(diag(oo_.var(1:10,1:10)))./oo_.mean(1:10);

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



I tried to change the lgy_(1:10,:) to M_.endo_(1:10,:), but still, a set of error information as same as above.

Thanks for this help.
winifred
 
Posts: 12
Joined: Tue Oct 21, 2008 10:02 am

Re: from Dynare v3 to Dyanre v4.0.3

Postby StephaneAdjemian » Tue Jun 09, 2009 10:22 pm

I can't find out where is the problem in the first line. I tried this line with one of my mod files without any problem. Can you post your mod file?
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: from Dynare v3 to Dyanre v4.0.3

Postby winifred » Thu Jun 11, 2009 3:21 pm

s
Attachments
model100.mod
(837 Bytes) Downloaded 89 times
winifred
 
Posts: 12
Joined: Tue Oct 21, 2008 10:02 am

Re: from Dynare v3 to Dyanre v4.0.3

Postby StephaneAdjemian » Mon Jun 15, 2009 1:46 pm

Hi, I still don't know why, but it appears that oo_.mean is not always
a column vector. In your case it's a row vector, so you have to
transpose it.

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