Drawing from Gamma distributions in model simulations

Dear all,

I’m trying to simulate a model where my shocks come from a Gamma distribution (several shocks all coming from the same Gamma distribution). The model is log-linearized and I’m doing a first order approximation.

It’s very easy to draw from a Gamma when doing IRFs, but I see that it is tricky to have non-Gaussian shocks in stochastic simulations. I have been reading in legacy posts the hack about changing the simult.m file in the dynare/matlab folder. How should I do it in this case?
Also, to make sure that I understand, should I change the simult.m file to run the simulation and then change it back to the original state after that?

How should I taylor the dynare code then? Given that we usually do var ea; stderr 0.01; with gaussian shocks, how should I include my shape and scale parameter?

Thanks indeed

What exactly is your goal? Shocks from a Gamma distribution cannot be mean 0.

After thinking about this, I think I can reformulate my shocks to be Gaussian. I just needed an AR(1) process in the positive support, but I can model a Gaussian shock with an small enough variance so that the process doesn’t become negative with probability one. Nothing else special about the Gamma, I just got confused, apologies!