Hi I am making a tramsition from version 3 to the latest version 4.
I find that the stoch simul has very different results for cross correlation computaions. What is the reason for this difference? For example cross correlation chnages from -.5 to -.69.
Generally correlations seem like bigger numbers in version 4?
Which one should I report in my work, version 3 or version 4?

Are you using theoretical moments or simulated moments? In the latter case, the discrepancy probably comes from a sampling error, you should probably increase the number of simulations.

If you are using theoretical moments, please send us the MOD file so that we can determine if this is a bug in Dynare.

Dear Sebastien, Thanks for the prompt response. I am using the theoretical moments and the matrix of cross correlations. Can you please explain how dynare computes theoretical moments and cross correlations. I did not see any option to calculate simulated moments.

Anyways I attach the programme again. Thanks again for your help.
-PB AP17_adj_ret1.mod (2.72 KB)

I tested your MOD file with Dynare 3 and with Dynare 4.1.0, and I get exactly the same results. In particular, the matrix of cross-correlations is the following on both versions:

MATRIX OF CORRELATIONS
Variables q g infl iy ret
q 1.0000 0.0436 -0.7332 0.9690 0.7440
g 0.0436 1.0000 -0.6889 -0.2044 0.6998
infl -0.7332 -0.6889 1.0000 -0.5467 -0.9875
iy 0.9690 -0.2044 -0.5467 1.0000 0.5559
ret 0.7440 0.6998 -0.9875 0.5559 1.0000

I compared the results from Dynare 3 and Dynare 4.0.4 using the example file RBC_Monop_JFV.mod. I got the different results. I used the same MOD file came with Dynare 4.0.4. Both dynares are on Linux built from source.

Dynare 3: RBC_Monop_JFV.mod

AUTOCORRELATION OF SIMULATED VARIABLES

VARIABLE 1 2 3 4 5
c 0.9930 0.9858 0.9769 0.9666 0.9551
i 0.9148 0.8379 0.7624 0.6926 0.6262
k 0.9981 0.9951 0.9902 0.9836 0.9755
l 0.8988 0.8068 0.7170 0.6345 0.5567
r 0.9127 0.8322 0.7531 0.6804 0.6121
w 0.9844 0.9696 0.9535 0.9369 0.9195
y 0.9619 0.9271 0.8920 0.8584 0.8252
y_l 0.9844 0.9696 0.9535 0.9369 0.9195
z 0.9494 0.9033 0.8575 0.8143 0.7724

Dynare 4.0.4: RBC_Monop_JFV.mod

AUTOCORRELATION OF SIMULATED VARIABLES

VARIABLE 1 2 3 4 5
y 0.9678 0.9358 0.9037 0.8721 0.8401
c 0.9960 0.9889 0.9801 0.9700 0.9585
k 1.0005 0.9973 0.9922 0.9855 0.9772
i 0.9240 0.8533 0.7849 0.7200 0.6559
l 0.9084 0.8239 0.7424 0.6657 0.5907
y_l 0.9883 0.9743 0.9591 0.9431 0.9260
w 0.9883 0.9743 0.9591 0.9431 0.9260
r 0.9199 0.8456 0.7739 0.7061 0.6396
z 0.9561 0.9137 0.8718 0.8314 0.7911

Hi Yulan, You are computing 2nd order moments using samples generated by the DSGE model. If you do not fix the seed (see the manual and/or the documentation of matlab) or do not compute theoretical moments (again see the manual) you won’t obtain the same results.

There is something weird in your reported results with Dynare 4.0.4, the first order autocorrelation of k is slightly greater than one!!.. This should never happen.

I installed Dynare-4.1.0. Configuration (with matlab, without octave) and make are Okay, no errors. But Matlab was crashed when I ran some of the MOD files under tests directory which include example1.mod and example2.mod. The same example1.mod and example2.mod work fine with dyanre-3. Anything wrong with my installation? My system is:

MATLAB Version 7.4.0.287 (R2007a)
MATLAB License Number:
Operating System: Linux 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:56:28 EST 2006 x86_64
Java VM Version: Java 1.5.0_04 with Sun Microsystems Inc. Java HotSpot™ 64-Bit Server VM mixed mode

“make check” gives following error message:
…
Making check in tests
make[1]: Entering directory /apps/dynare/dynare-4.1.0/tests' make check-local make[2]: Entering directory/apps/dynare/dynare-4.1.0/tests’
error: invalid number of indices (= 0) for 2-dimensional array
error: evaluating argument list element number 1
make[2]: *** [check-octave] Error 1
make[2]: Leaving directory /apps/dynare/dynare-4.1.0/tests' make[1]: *** [check-am] Error 2 make[1]: Leaving directory/apps/dynare/dynare-4.1.0/tests’
make: *** [check-recursive] Error 1

Other than those error message, I have only dump files generated from crashed matlab. I also installed 4.1.1, ‘example1.mod’ and example2.mod’ under $DYNARE_ROOT/tests/ also crash matlab. I digged a little bit when running example1.mod, the crashing is coused by line 568 in dr1.m:

B1 = B*A_times_B_kronecker_C(dr.ghxx,hx,hu1);

Before line 568, dr.ghxx, hx and hu1 have following values: