Variance decomposition


Does anybody know how I can get a forecast error variance decomp? Is there a command, a routine available, or an easy way of doing it?


this is an automatic output of the stoch-simul command.
however dynare so far gives us only the infinite horizon var decomp. for shorter horizons ( more interesting to most people) you have to code yourself.