I have a model written in levels and let the Dynare linearize the model for me (i.e. all variables are written without exp). I use the net nominal interest rates (i.e. 1 + r appears in equations) in the model.

Please, is it correct to code the model with the following interest rate rule?

Thank you for responding Johannes. It works - the problem is that following this rule, the interest rate is set according the absolute deviations of the variables from their steady states. Am I right?

When reacting to the developments in inflation, the rule performs well. On the other hand, if I add a non-zero weight to the output deviation, the model dynamics crashes (the IRFs start to behave in a weird manner). I think that more suitable would be to respond to percentage deviations instead (which is a common approach in DSGE models).

What would be then the appropriate way to incoporate percentage deviations into the rule? Take logs of inflation and output?

The source of the problem should be somewhere else. If you take the log of the above Taylor rule, you should end up with the standard Taylor rules you see in most papers. They should be isomorphic.