Is there a short way of implementing prior analysis similar to this paper: Clearing Up the Fiscal Multiplier Morass in Dynare.

What I ask is not bayesian estimation in Dynare. I want to assign prior distributions to some parameters and then update parameter for each iteration then look at the 90 percentile.

I’ve seen some topics on this which use loops in dynare or matlab but due to the large iteration I try to find an efficient way not to solve the model for each iteration.

Profess Pfeifer,
Thank you. Is there restrictions for parameters to be function in the prior_function file ? Or we simply use the parameters of interest in that function file ?

I think I was confused about the composite parameters. We can still use this file if we don’t have composite parameters as in prior restriction m file? I tried to run Gali_2015.mod but for some reasons I get errors with dynare 4.5.7 and matlab 2022a. Is there a missing datatomfile script in the repository ?

Thank you. I am not sure about the best approach to do this:

I calibrated the model but I want to draw parameter values from prior distribution by taking random draws from those distributions.

After repeating this N times, I try to save the irfs.

Then I want to plot some variables with 90/95 percentiles of saved irfs similar to the paper I posted above.
I use order 3, therefore I am not sure how to approach. I wrote a matlab file to loop over a parameter as an example but it doesn’t seem efficient and reasonable due to the large draw.

Is it possible to implement those steps using Gali_2015 codes ?

Thank you very much. I get this error: line 163, cols 50-63: syntax error, unexpected NAME which corresponds to nomodelsummary option in stock_simul.

I get this error when I remove that part and run:

EXECUTE_POSTERIOR_FUNCTION: Execution of prior/posterior function led to an error. Execution cancelled.
Error using stoch_simul
Too many input arguments.