Hi Prof., Sorry to disturb again.
I am now having some problems regarding simulation cross-sectional data. I notice you have some nice files for simulation, eg https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Hansen_1985/Hansen_1985.mod
There you use simul_replic=100, to generate 100 simulations. However, I am having trouble doing the following: (the following is from some papers)
We simulate the model at the annual frequency. Each simulation has a length of 80 years. We drop the first 10 years of each simulation and repeat the process 100 times. At the cross-sectional level, each simulation
contains 5,000 firms.
So my understanding for this exercise is that, they do a total of 5000 firms * 70 years panel. Then they do this for 100 artificial such panels. and they calculate the cross-sample average of each sample moments.
The option in your sample code seems to do 100 artificial such panels. But not the 5000 firm thing. I wonder if you have any idea how I could do this in after dynare has solved the model and plotted the IRF? Any examples using dynare would be greatly appreciated.
That depends on the model. The cross-section would need to be defined in the mod-file
Sorry for this late reply. Continuing your previous reply, suppose now I am interested in just one simulated sample. i.e 5000firms*80 years, but not repeating the process for 100 times. ie. Only repeat it for once.
Then can I use simul_replic=5000, in stoch_simul in dynare mod file? It generates 5000 replications of one simulation. Then i use your get_replic_simulation.m to access all the simulations. But I tend to believe that it could ALSO represent 5000 firms cross-sectionally. Is this correct?
My model is in partial equilibrium and firms are only subject to idiosyncratic shocks that follow the same distribution.
Further, does it mean that in such cases, simul_replic=5000 can represent 5000 samples of an average firm over time, AS WELL As, 5000 firms over time for one sample?
If there is no distinction between two individual firms except the sequence of shocks drawn, then the interpretation of a single simulation is completely up to you.
Thanks for your prompt reply. I am curious why you say it is a SINGLE simulation if I use simul_replic in stoch_simul?
It seems to me that it is a replication of a simulation.
Sorry I am slow. Just to double confirm that simul_replic=5000 does represent 5000 samples of an average firm over time? AS WELL AS, 5000 firms over time for one sample? Sorry for repeating this.
Appreciate your help. Best, R
I used that term to refer to one time series simulation for one firm.
Yes, what you are saying is correct.
Thanks! It is very helpful! Thank you!