I need to put the “dynare *.mod” operation inside a loop. In each loop, I solve the model with different parameter values and simulate a panel of artificial data using the solution. Since nothing is changed in each loop except the parameters and I calculate the steady state with my own m-file, I am thinking to do the following to save computational time: compile the mod file once at the beginning to generate the corresponding m file. Afterwards, within each loop, I change the parameter values directly in M_.params and just run the m file in the loop. Can you let me know whether this procedure will give me the correct solutions?
Thanks a lot for your help! I will compare the results from both methods. You are probably right. I will check on the time saved to see whether it is worthwhile.
Best,
Erica
Hi everybody,
i’m currently doing a similar stuff. Actually I run a mod file inside which I have a loop over a parameter “sigma” and similate the model for each value of this parameter. I’m particularly interested in the standard deviations of the endogenous variables.
How could you get these moments at the same time with the corresponding parameter “sigma” ?