Log-linear model with some linear variables and an already log-linearized Taylor rule

I want to code up a non-linear model and perform a first-order log-linearization.
I understand that I need to invoke exp() on the variables I would like to log-linearize. There are also some variables (R and pi) that are already in percentages that I would like to only linearize, in which case I do not need to transform them with exp(). For example, for an Euler equation I have used:

exp(M) = betta*exp(M(+1))*(1+R)/(1+pi(+1));  

where M is marginal consumption and I have left R and pi without the exp transformation.

The difficulty is that i would also like to include an already log-linearized equation for the Taylor Rule. My understanding is that this is fine as long as I correctly specify the relationship between the hatted variables and the raw variables.
For the Taylor Rule I have used:

R_hat = mp_rlag*R_hat(-1)+(1-mp_rlag)*(mp_infl*pi_hat+mp_u*ubar*u_hat+m_hat;
pi_hat = pi - pibar;
R_hat = R - Rbar;
u_hat = log(u) - log(ubar);

My question is have I correctly defined the hat variables correctly for the linear variables, pi_hat and R_hat?

That depends on how you defined R_hat in the first place. My guess is that you did not linearize the Taylor rule with respect to R and pi. Is there a reason you do an exp() substitution instead of appending auxiliary variables and equations with the logged variables you are interested in?

Thanks for the help. There is no particular reason I chose the exp() way. Are you suggesting that a simpler way is to instead write:

M = betta*M(+1)*(1+R)/(1+pi(+1)); 
m = log(M); // Auxillary variable defined

where m will be the relevant variable for percentage change deviations.

But if I use this format, then on the Taylor Rule, perhaps it is better for me to define the interest rate and inflation in gross terms, and then just insert the rule as:

log(R/R_ss) = rho_r*log(R(-1)/R_ss) + (1-rho_r)*(phi_pi*log(Pi/Pi_ss) + phi_u*log(u/u_ss)) + eps_r;
R_ss = 1/betta;
Pi_ss = 1;

M = betta*M(+1)*R/Pi(+1); 
m = log(M); // Auxillary variable defined

Yes, that sounds like the best way to proceed.

1 Like