# Higher order IRFs and comparing models

**URL:** <https://forum.dynare.org/t/higher-order-irfs-and-comparing-models/26472>\
**Category:** Stochastic simulations\
**Created:** [24 September 2024 09:39 UTC](https://forum.dynare.org/t/higher-order-irfs-and-comparing-models/26472 "2024-09-24T09:39:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpetrini](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/8e7dd6/32.png) [@gpetrini](https://forum.dynare.org/u/gpetrini)\
**Post date:** [24 September 2024 09:39 UTC](https://forum.dynare.org/t/higher-order-irfs-and-comparing-models/26472/1 "2024-09-24T09:39:01Z")

</div>

Hello everyone,

I have some questions related to IRF.

**Q1:** The first question regards IRFs of order\>1. I found some posts indicating that if the order is higher than 1, what stoch\_simul returns is a GIRF. The majority of them refer to an archived link about how IRFs are computed in dynare ([here](https://archives.dynare.org/DynareWiki/IrFs)). However, I could only access a snapshot of this page from the beginning of 2024. Is this still the case? I searched the wiki on GitLab and did not find a respective page.

**Q2:** I want to compare the GIRFs of different models. Assuming that the answer for Q1 is **yes** , is relative\_irf enough to make the GIRF comparables? In other words, the GIRF are expressing the same information (say, the effect of shock x is the % change in variable y in contrast with a contrafactual without shock)?

Thank you in advance for your help

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [24 September 2024 18:51 UTC](https://forum.dynare.org/t/higher-order-irfs-and-comparing-models/26472/2 "2024-09-24T18:51:12Z")

</div>

1. Yes, at higher order Dynare still generates generalized IRFs. We haven’t yet had the time to fully migrate the old wiki.
2. What exactly to you want to compare? Usually, you don’t need `relative_irf` for comparisons across models. It’s more about making IRFs for shocks with different standard deviations within a model comparable.

---

<div class="post-metadata">

**Author:** ![dh.murakami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/58956e/32.png) [@dh.murakami](https://forum.dynare.org/u/dh.murakami)\
**Post date:** [18 March 2026 18:36 UTC](https://forum.dynare.org/t/higher-order-irfs-and-comparing-models/26472/3 "2026-03-18T18:36:17Z")

</div>

Hi @jpfeifer I’ve tried searching the forums if there’s a way to implement the GIRFs you have in `NKM.mod`,

```auto
% GIRFs given states in 42 and shocks in 43
t0=42;
options_.occbin.irf.exo_names=M_.exo_names;
options_.occbin.irf.t0=t0;
% OccBin will plot IRFs in response to positive and negative realisations of shocks
oo_.occbin.irfs = occbin.irf(M_,oo_,options_);

var_list_ = {'c','n','y','pigap','inom','inomnot'};

% if you want to scale:
% options_occbin_.plot_irf.endo_scaling_factor = vars_irf(:,3);
options_.occbin.plot_irf.simulname = ['t0_' int2str(t0)];
options_.irf=40;
occbin.plot_irfs(M_,oo_.occbin.irfs,options_,var_list_);

```

but for non-OccBin estimation/smoother model files.

Is there an example `.mod` file for this?

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [20 March 2026 07:12 UTC](https://forum.dynare.org/t/higher-order-irfs-and-comparing-models/26472/4 "2026-03-20T07:12:20Z")

</div>

You mean like [DSGE\_mod/RBC\_state\_dependent\_GIRF/RBC\_state\_dependent\_GIRF.mod at master · JohannesPfeifer/DSGE\_mod · GitHub](https://github.com/JohannesPfeifer/DSGE_mod/blob/master/RBC_state_dependent_GIRF/RBC_state_dependent_GIRF.mod) ?

---

<div class="post-metadata">

**Author:** ![dh.murakami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/58956e/32.png) [@dh.murakami](https://forum.dynare.org/u/dh.murakami)\
**Post date:** [20 March 2026 09:18 UTC](https://forum.dynare.org/t/higher-order-irfs-and-comparing-models/26472/5 "2026-03-20T09:18:02Z")

</div>

Sort of. I want to generate GIRFs after model estimation (without OccBin). So something similar to the `occbin.irf();` function just without the `occbin` call.
