After simulating the model in Dynare++1.3.5, the matlab .mat file is generated. However, I could not find the “simulated data” in the .mat file. I could get only steady state, simulated mean, simulated var-cov matrix… Is it possible for me to see the generated data for each variables?

I have another question on the simulated data. Then, the mean values of simulated data using dynsre_simul.m are supposed to converge the values of dyn_mean? (if the number of simulation is large enough). Am I right?

you are right, provided that the realizations of the shocks you feed to dynare_simul were generated with the same variance-covariance matrix as in the model file.

Hello. As you advised, I tried to simulated my model using dynsre_simul.m. But I found that the mean value of the simulated data are not consistent with the mean values in dyn_mean. I simulated 20000 data, so I guess it is large enough. I suspect if it is a kind of possible bug, since the procedure I followed was very standard. Or it can be just my stupid mistake…

I’m attaching my model file ( bSbL_a.mod), and the model simulation m file ( Simulation.m). Could you see if I’m making some mistake or there is a bug?

For this model, the variable I’m interested is RS1 and RL1, which are 7th and 8th endo variables.
Dyn_mean says that mean(RS1) = 0.034621 and mean(RL1)= 0.05131, but the simulated data says that both are around 0.055 or so.

In the previous files I attached above, I used 3rd-order apporximation.
But when I used 2nd order approximation, the results from Dynare++1.3.5 were significantly (even signs in the vcov matrix) different from those from Dynare v3, as I reported before.

When 2nd order approx, the fact I’m interested in is the cov(y, RL1), cov(y, RS1), and cov(y, sp). In dynare v3, signs were cov(y, RL1) >0, cov(y, RS1) >0, and cov(y, sp) <0. However, in Dynare++1.3.5 the signs were reversed. As you mentioned before, it might be another bugs…

I also found that the var-cov matrix from the simulated data using dynsre_simul.m is significantly different from that of dyn_vcov in dynare++. Please let me know if it is a bug, or I did something wrong. I already attached my .mod file.

Recently, one user notified me that there is an error in drawing random numbers for different threads in Windows version of dynare++. The error is that Windows implementation somehow makes different instaces of a random drawer for different threads and all these instances are initialized to the same state, so they generate the same draws. I have already started rewriting and redesigning the code so that each thread gets its own instance of random number generator and it will be deterministicaly initialized to the different states. dynare_simul.m does not have this problem, sionce it is only single threaded.

This means, if you work on windows, you should try to simulate one long simulation, i.e. --sim 1 --per 20000 for instance.

However, there might be many other reasons for the behaviour you are describing. Please, check whether some simulations were not thrown out (in journal file).

Unfortunatelly, I do not have any time to look at your codes now, we are just in the craziest part of quarterly forecast. But I will be back.