Mat files with IRF output

As I need to combine some IRF plots, it would be a big help, if someone could explain the structure of the 4-dimensional matrices in the [modelname]_irf_dsge1.mat files, or/and point me to the exact m files that creates them.

Thanks in advance,
Niels

Hi Niels,

The computation of the posterior IRFs starts from line 2473 in metropolis.m.

The architecture of the four dimensional arrays is as follows:

dimension 1 = periods
dimension 2 = (selected) endogenous variables
dimension 3 = exogenous variables (structural shocks)
dimension 4 = draws in the posterior distribution.

But I am not sure you really need to look inside these mat files. The IRFs produced by dynare are saved in the global oo_ :

oo_.PosteriorIRF.Dsge.Mean :: gives you the posterior mean IRFs,

oo_.PosteriorIRF.Dsge.Median :: gives you the posterior median IRFs,

oo_.PosteriorIRF.Dsge.Std :: gives you the standard deviation of the IRFs posterior distribution

oo_.PosteriorIRF.Dsge.Distribution :: gives you the deciles of the IRFs posterior distribution.

Best, St

[quote=“StephaneAdjemian”]Hi Niels,

… But I am not sure you really need to look inside these mat files. The IRFs produced by dynare are saved in the global oo_ :
[/quote]

Thank you, Stephane, I actually found them myself but forgot to post.

Much appreciated,
Niels