Factorize IRF code into function generate_irfs(M_,options_,oo_)
Take the fragmented codes from stoch_simul
and PosteriorIRFcore1
and put them into one function that is used in those other commands, but can also be called as a standalone. Related to #1531 (closed).