# How to input the log-linearized model

Hi, I log-linearize a model and use the command model (linear), but I find both the command “model(linear)” and the command “model” get the same eigenvalues, the rest of the mod file is exactly the same
I wonder why the result is the same when I change “model(linear)” into “model”. I believe I must input the log-linearized model in a wrong way , so how to input the log-linearized model . Thanks in advance.

Dynare always does a linearization.

So if you want to do a log-linearization, you should write your model after applying a variable transformation: replace X by exp(X) (so that the new X is the log of the original X).

Thank you for your reply, but I am still a little confused, maybe I can get it from a specific example.
Assume an original equation is 1/c=beta*(1/c(+1)), the log-linearized form is -c_hat=-c_hat(+1),where c_hat=logc-logcc as cc is the steady state, I take the log linearization because the steady state of c_hat is zero.
I define c_hat as a endogenous variable, use the command model(linear), and input the equation “-c_hat=-c_hat(+1)”,and at last use the stoch_simul. Could you please tell me wheather the above is correct.
If I input exp(cc) in which cc represent logc, then the steady state of cc is not zero, and I find it difficult to find the initial value of steady state.

1 Like

[quote=“firefoxxp”]Thank you for your reply, but I am still a little confused, maybe I can get it from a specific example.
Assume an original equation is 1/c=beta*(1/c(+1)), the log-linearized form is -c_hat=-c_hat(+1),where c_hat=logc-logcc as cc is the steady state, I take the log linearization because the steady state of c_hat is zero.
I define c_hat as a endogenous variable, use the command model(linear), and input the equation “-c_hat=-c_hat(+1)”,and at last use the stoch_simul. Could you please tell me wheather the above is correct.[/quote]

Yes this is correct. The only drawback is that you are doing the log-linearization yourself instead of letting Dynare doing it by itself. On small models it is ok, but on big models you will probably prefer to have Dynare doing the log-linearization.

[quote=“firefoxxp”]
If I input exp(cc) in which cc represent logc, then the steady state of cc is not zero, and I find it difficult to find the initial value of steady state. [/quote]

I don’t understand your point. The steady state of cc is simply the log of the steady state of c. Nothing complicated to deal with.