Normal AND Non-Normal Random Variables

Dear Support Team

I was wondering whether it is possible to use random variables following non-normal distributions ALONGSIDE with standard normal distributions in Dynare 4.
I would need to use both normally distributed shocks and a variable following a binary distribution (value 1 with probability p, and value 0 with probability (1-p)).

I have already found a previous question on uniform distributions between 0 and 1:
[Drawing from non-normal distributions in model simulation)
where you said it was possible to change the Matlab code for shock variables. This, however, would change the distribution of ALL shocks I guess, so no co-existence of two differently distributed shocks?

Thank you and best wishes
antonia

PS: Another quick question: Is there an option for boolean operators (if) in Dynare?

You have to be more explicit about the application you have in mind. If the model is solved with perturbation (i.e. Taylor approximation), only the first n moments of the shock distribution are relevant for order=n. Thus, whether you use normal or binomial shocks does not matter for the solution itself. If you want to simulate the model given particular shocks, the previous post shows the way to go. You input into Dynare a matrix with shock values. Just make sure you drew them from the correct distributions (and using the correct covariance). If the shocks are independent this is easy as you can proceed shock by shock. The first shock (corresponding to the first column) could for example be drawn from a normal distribution, while the second column is drawn from a binomial one etc.

Hello

I am sorry I bring again the topic. Following this topic: Drawing from non-normal distributions in model simulation
I understood that if I want to introduce non-normal shocks to the simulation of my model I should modify the matrix in

oo_.exo_simul(:,i_exo_var) = randn(M_.maximum_lag+M_.maximum_lead+options_.periods,nxs)*chol_S;

My first question is that I cannot find the simult.m file. In the topic it says it is in the matlab directory, can anyone be more specific.
My second question is which order should I follow when constructing the oo_.exo_simul(:,i_exo_var) matrix, should I follow the order I declare the variables with the comand “varexo”

Thanks in advance, any commentary will be more thatn appreciated

In your dynare installation folder there is matlab subdirectory that contains the file.
The order should be in declaration order. You can check this in M_.exo_names