Simulate data using shocks

after i do bayesian estimation, i want to simulate data using some of the estimated shocks,not all of them ,how can i do that using stoch_simul command? how to set the initial value?thanks a lot!

Hi, Didn’t test but I think that changing the values in M_.Sigma_e after the estimation will do the trick. If the shocks are not correlated, you just have to change the elements on the diagonal. The ordering of the shocks in M_.Sigma_e is defined by the order of declaration (with varexo). For Instance, for removing the first shock just type M_.Sigma_e(1,1)=0; after the estimation command and before stoch_simul.


thank you so much it’s really helpful!

  1. What @stepan-a suggests results in new random shocks being drawn from the estimated distribution.
  2. What you seem to be looking for is counterfactual simulations based on the smoothed shocks. Please see Counterfactual simulations based on smoothed shocks

yes you are right what I am trying to do is counterfactual experiment .thank a lot !all the best