Deviation form steady state

Dear Prof. Jpfeifer,
I would like to plot “percentage deviation from steady state” for the IRFs. I have reviewed other posts but I got very confused. I used order 1 : stoch_simul(periods=2100,irf = 100,order =1); percentage deviation from steady state is which one?:
1: 100* oo_.irfs.c_P_epsilon_Eps/oo_.steady_state(7);
or
2: log( oo_.irfs.c_P_epsilon_Eps);
or
3: log(oo_.irfs.c_P_epsilon_Eps/oo_.steady_state(7));

and I have a determisitic model with :
perfect_foresight_setup(periods=203);
options_.simul.robust_lin_solve=1;
perfect_foresight_solver(stack_solve_algo =0);

Is “percentage deviation from steady state” :
100*(oo_.endo_simul(39,:)-oo_.endo_simul(39,1))/oo_.endo_simul(39,1);

I am looking forward to hearing from you
Leo

Hello,
I am still waiting for the answer, IS there anybody who knows the answer?
Thnaks

That depends on your variable definition. If you defined your variable in logs, the IRF is already in percentage deviations. If the variable is in levels, things are different. Options 2 and 3 are wrong, because the numerator will have a mean of 0 and you cannot take the log of 0. Option 1 is correct, unless your variable has a steady state of 0. To see that option 1 is correct, consider that

X_IRF=X_with_shock-steadystate(X)

Therefore, with option 1 you have

(X_with_shock-steadystate(X))/steadystate(X)

which is the exact definition of a percentage definition.

Thank you very much for your time and consideration.
And what about deterministic model? is it percentage derivation of steady state? (All my variables are in level)

100*(oo_.endo_simul(39,:)-oo_.endo_simul(39,1))/oo_.endo_simul(39,1);

If you start at the steady state with your simulation, that would be correct. Otherwise, it will be a percentage deviation from the initial point.

Thank you so much for your great comment. Yes, I start from the steady state, so there is no problem.
Sincerely,