Figure loop parameters

Hello,

I want to plot IRF of different parameter values in the same figure. In my loop file, beta takes four different values and I would like to show the IRF of “sdf_eR” for four different beta values. Currently, it only shows the same IRF for four times.

The main problem is that in .mod file “set_param_value(‘beta’,beta);” while it is “set_param_value(‘beta’,betas(i));” in the .m file. So I think it is just taking the initial beta value rather than looping over.
I have attached .m and .mod file that includes loop.iac.m (1.2 KB) iacov.mod (3.0 KB)

Can anyone tell me where I made a mistake?
Thanks.

What you are doing is not a proper loop. The full call to Dynare will override all settings in the m-file. See