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.

Thanks in advance.

[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.

Thank you for your explanation.

As in the example, 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.

But I find the command “model(linear)” and the command “model” get the same eigenvalues(the rest of the mod is the same), in my opinion, I use the command “model” and input the original model should get the same eigenvalues when I use the command “model(linear)” and input the log-linearized model, does it mean that dynare can automatically recognize the linear model and deal with it like a linear model?

Sorry, but I also do not get your point. The option “linear” tells Dynare your model is already linear and thus speads up some computations. However, when your model is already linear, not putting linear does of course not influence the results. A linear approximation of a linear equation is simply the equation itself. Hence, Dynare’s linearization is redundant in that case, but delivers of course the same results as putting “linear”.