MODEL SIMULATION for several values of a parameter

Hi,
I would like to simulate a model with DYNARE by limiting the value of one parameter to a defined range (from 0.1 to 1.5, with 0.01 as size of increment) and extract the outcome for each value of this parameter within the range.
Please, Can you help me ? How to do that with dynare?
Any idea will be welcomed and appreciated.
Best,

See [Loop over parameters)

Thank Jpfeifer, I will try to see it.

Dear Johannes,

I am trying to find moments and IRF of some variables when 2 and 3 policy parametrs change. I made the following loops in separate matlab-files, which run, but I need help in order to save and extract moments and IRF when the loop is over 2 or 3 parameters.

betha1s= 1.5:0.1:1.9;

for i=1:length(betha1s)

    betha2s=0.5:0.1:0.6;
    for j=1:length(betha2s)
        set_param_value('betha1',betha1s(i));
        set_param_value('betha2',betha2s(j));
        dynare pays_111_sP noclearall;
        moments(:,i)=diag(oo_.var);
      
    end    

save(‘results_’,num2str(j)])

end

Questions: 1) This code runs, but not able to give me the moment change over parameter values (here, 10 variances). I get only 2 or 5 variances instead of 10. How to do that?
2) How can I save and call IRFs for some variables using the 2 loops?

This is not the correct way to do it. Please provide your files.

Please Johannes,
Herewith the files.
Thanks! in advance,
parameterfile.m (1.04 KB)
pays_111_sP.mod (3.01 KB)

The attached file should do what you want.
pays_111_sp.zip (1.93 KB)

Dear Johannes,
Thank you very much, this has been very helpful for me.
Best,

Dear Johannes,
Please if I will just extract the IRF for these 2-loops, I need to add which code line?
Best,

Maybe I’m missing something here, but you could just add a line that is of the form:

xirf(i)=oo_.irfs.C_eps_x(i)

where x is the shock of interest

Thank you,
But there are some things you missed, because i am looking for the 2 loops IRFs, like xirf(i,j).
Do you have any hints?

Something like:

Thank you Johaness, It seems to work.