# Question about plotting IRF (urgent)

In Dynare, it is known that if stoch_simul only plot IRF of variables defined in model equations. However, given that one of variables is in “difference” form and I want to know the IRF of variable in “level” form. The version I use is Dynare 3.65. What should I do?

Here’s my guess. I guess I can define one more variable, say c and c in difference form is dc. So in the part of model equations, I include dc = c - c(-1). However, my concern is that c is not stationary. It would affect the estimate. How could I handle this situation?

I also propose one method to carry out the computation of “level” variable based on “differenced” variable. My way to do this is based on algorithm in computing IRF in Dynare. Given the exogenous shocks are orthogonal, the procedures are,

1. specify the increase in shock by 1 standard deviation by “shocks” command, the remaining values of shocks at other periods are set to zero;
2. deterministically simulate the path of variable based on the assigned values of shocks set in procedure 1 by command “simul”;
3. Compute IRF based on formula y_t(s) - y_head, where y_t is the simulated value of y_(t+s) based on 1 standard deviation increase in a shock. If y_t(s) is in “difference” form, accumulate it. It can be done by creating the new array by using MATLAB command
4. Plot the graph of IRF by using MATLAB command for graph plotting

However, the path of variables is simulated by applying Newton’s Method on model equations. If I wish to do it by using approximated function, what should I do? Because after applying step 1, I cannot simulate the path of variable by using stoch_simul which computes the approximated policy function.

Dear all,

I have known that the IRF calculated from Dynare can be extracted from the global workspace. Say we have computed the IRF of variable c in “difference” form, denote as dc, to the shock e. Then the array dc_e is created for storing the values of IRF. Based on the fact that the IRF of variable in “level” form is accumulated by IRF of variable in “difference” form if VAR in first-difference is carried out, then we can accumulate IRF of variable d_c to get the IRF of variable c which is in “level” form, is it correct?

Also given the relation y = y_head + x and assume that y and x are non-stationary and y_head is stationary. Furthermore, given that x = x(-1) + mu and mu is stationary. Given that the IRF of x can be obtained by accumulating IRF of mu, then the IRF of y can be obtained by summing IRF of y_head and IRF of x. Is it a right way to do this?

Can anyone confirm with them? Thanks at all…

[quote=“dennis0125hk”]Dear all,

I have known that the IRF calculated from Dynare can be extracted from the global workspace. Say we have computed the IRF of variable c in “difference” form, denote as dc, to the shock e. Then the array dc_e is created for storing the values of IRF. Based on the fact that the IRF of variable in “level” form is accumulated by IRF of variable in “difference” form if VAR in first-difference is carried out, then we can accumulate IRF of variable d_c to get the IRF of variable c which is in “level” form, is it correct?
[/quote]

Yes, it is correct

Correct, as well

Best

Michel