# Question about understanding irfs in dynare

Hi,
I have a question about understanding irfs in my model. I’ve seen several posts on the forum about it but I’m still confusing.
My question is: in my model, does the vertical axis in irfs’ graph represent percentage deviation from steady state value or just the difference b/w variable following a shock and its steady state value? For example, does y in irf graph represent (yt-y*)/y* or yt-y*, where yt is output following a shock and y* is the steady-state output ?

Thanks so much!
Best,RBC_baseline.mod (1.9 KB)

1 Like

Hi, It depends on the approximation. The default is linearization, in this case the IRFs are in deviations to the deterministic steady state. At first order you can use the option `loglinear`, Dynare log linearize the model and the IRFs are in percentage deviations to the deterministic steady state.

Best,
Stéphane.

2 Likes

To be more precise: it depends on how the variables in your model are measured. As @stepan-a says, Dynare conducts a linearization.

1. If you for example have a nonlinear model and your model variable is simply the level of output, the IRF will measure the difference between the variable and its steady state (or its mean at higher order). This is the case with https://github.com/DynareTeam/dynare/blob/master/examples/example1.mod

2. In contrast, if your model variable already measures percentages, you will get the percentage deviation from the steady state, because that is what the simple deviation from steady state measures in this case. This is for example the case when you entered an already log-linearized model where all variables are percentage deviations from trend.

3. Now there are cases where in a nonlinear model you want percentage deviations from steady state instead of simple deviations. There are three ways to do this:

1. Use the `loglinear` option. The downside is that all variables in the model will be log-linearized using a Jacobian transformation, leading to trouble if you have variables with 0 or negative steady states. See the example at https://github.com/DynareTeam/dynare/blob/master/tests/loglinear/example4_exp.mod
2. Perform an `exp()`-substitution, i.e. put the variable you want to be in percentage deviations consistently in `exp()` and adjust the steady state accordingly. Thereby, Dynare will do a linearization with respect to a variable that is effectively the log of the original variable, leading to a log-linearization instead of a linearization. See Section “4.4 Linearization vs. Log-linearization” in Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models” and as an example https://github.com/DynareTeam/dynare/blob/master/tests/loglinear/example4_loglinear.mod
3. You can simply append the logs of the variables that interest you as auxiliary variables to your nonlinear model and consider these variables, which then measure percentage deviations from trend. An example is https://github.com/JohannesPfeifer/DSGE_mod/blob/master/RBC_baseline/RBC_baseline.mod
8 Likes

Thanks so much for your detailed reply, Dr. Jpfeifer! This is so useful and helpful! Highly appreciate that！

If I were to use the third option above, would I still need to multiply all log-transformed variables by 100 to obtain percent deviations?

The multiplication with 100 is only for convenience in order to have a value of 1 denote 1 percent instead of the usual 0.01.