How is "mean" in oo_.mean calculated?

If I have a DSGE model with several shocks, i.e. cumulative according to the handbook, what does oo_.mean give me in this case? I am looking for the mean of the simulated IRFs for each shock separately (following a standard stoch_simul execution). How would I get that? Thanks!

1 Like

What do you mean with

? You want to specify a horizon and simply compute the mean over the IRF? You would need to do that manually based on the stored results in oo_.irfs.

Thank you very much, that is helpful!
I think, my question is then more: In another part of the forum you said about moment calculation:

What does ‚Äúsimulate data series based on the perturbation solution‚ÄĚ mean exactly?, how much ‚Äúdata series‚ÄĚ are simulated?, will I not only receive moments based on this when I ask for more >100 periods? for <100 periods, what do the moments in the dynare output tell me (in contrast to what I described in my first question above)? most of all: where could I see all of this in the dynare matlab codes (to see for myself)?

Also, if I was only interested in how the system reacts to one shock in isolation, would I be able to retrieve moments for such simulation from the dynare output? Would I need to specify a separate model finding a solution with only that shock for every one of my shocks?

Thanks for your help!

The model will be simulated for the number of periods specified in the periods-option, after dropping a number of burn-in periods specified with drop. The relevant Dynare code is

    [ys, oo_] = simult(y0,oo_.dr,M_,options_,oo_);
    oo_.endo_simul = ys;

in matlab/stoch_simul.m · master · Dynare / dynare · GitLab
that will call


See matlab/disp_moments.m · master · Dynare / dynare · GitLab