Counterfactual analysis is used when we want to compare the actual IRF with counterfactual senario IRF. For example, if you want to examine inflation response to oil price shocks just ignoring the second round effects, you can use counterfactual IRF(no second round effects) to compare with the baseline IRF(with second round effects) in SVAR model.
Counterfactual IRF is produced from baseline IRF in SVAR using additional restrictions. This methodology has been used by Bernanke et al(1997), Sims and Zha(2006), Kilian and Lewis(2011) etc. In here I mainly refered the Wong(2015).
Consider the following VAR model.
$A_0 y_t =\sum_{i=1}^{p} A_i y_{t-i} +\epsilon_t $
where $y_t =[oil_t, \pi^e_t, \pi_t ]$ and $\epsilon_t$ is a vector of orthogonal structural shock.
Define the above equation in companion form.
$A_0 y_t =\sum_{i=1}^{p} A_i y_{t-i} +\epsilon_t $
$y_t =\sum_{i=1}^{p} A^{-1}_0A_i y_{t-i} +A^{-1}_0\epsilon_t $
$X_t =\Lambda X_{t-1}+v_t$
Let $E(v_t' v_t)=\Omega$ , $\tilde{A_0^{-1}}=chol(\Omega)$ and $e_j$ as a row vector with 1 as the $j$th element and 0 elsewhere.
Then the impluse response function of variable $j$ to $10\%$ oil shock at horizon $k$, $\Psi_j^k$ is
$\Psi_j^k=e_j \Lambda^k \xi$
where $\xi=\frac{0.1 \times \tilde{A_0^{-1}}e_1' }{e_1 \tilde{A_0^{-1}} e_1'}$
Usually the response of variable $j$ to shock $i$ at horizon $k$ is $ \Lambda^k_{i,j} $
so $\Lambda^k_{j,i}=e_j\Lambda^k e_i'$
Here I can't understand why we use $\xi$ and the meaning of its numerator and denominator.
[Note] The difference between $\tilde{A_0^{-1}}$ and $A_0^{-1}$ is just normalization. $A_0^{-1}$ is normalized to have 1 in its diagnal.