Question about Counterfactual Simulation

Dear all,
I have got the result of impulse response. I want to make an analysis of counterfactual simulations. But I don’t know how to do it in dynare.
Can someone tell me the operation steps of counterfactual simulation? It’s better to elaborate on the steps in a little detail.
Thank you in advance sincerely.

First, you need to describe which kind of counterfactual you had in mind.

@jpfeifer,I am sorry that I don’t know there are many kinds of counterfactual simulations.
The counterfactual problem is described below.‘In order to estimate the historical contribution of different exogenous shocks to macroeconomic variables in the whole time series, these shocks are introduced into the model in turn, and the results of counterfactual simulation are obtained.’
I want to know how I can get graphs like the picture below?Thank you in advance.

jpfeifer,could you give me an example of the operation? I have read previous posts about counterfactual simulations,but I’m really sorry I only know the simple operation of dynare.I don’t quite understand what those posts mean. Could you give me a little more details?Please!
Thank you very much.

Did you already obtain your smoothed shocks and the initial conditions? Also, please read Counterfactual simulations based on smoothed shocks