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.
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.
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.
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.
s
model100.mod (837 Bytes)
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.