Page 1 of 1

steady state values in a log-linearized model

PostPosted: Sun Sep 25, 2016 5:20 pm
by use
Hi,

I am using a log-linearized model, but for some cases I need to calculate the steady state values, for which non-linear equations should be solved, for instance, something like this for n_ss:

(theta-1)*(n_ss-1)/(theta*n_ss-theta+1)*n_ss^((2-theta)/(theta-1))*L_ss^(-phi)+delta*eta/(1-delta)=0

How should I proceed (I was thinking to write this in the parameters block, but system of nonlinear equations should be solved)?

Thank you in advance.

Re: steady state values in a log-linearized model

PostPosted: Mon Sep 26, 2016 12:16 pm
by jpfeifer
Please have a look at example3.mod in Dynare's example folder. There a steady state model-block is used to call a solver.

Re: steady state values in a log-linearized model

PostPosted: Tue Sep 27, 2016 6:19 pm
by use
Dear Johannes,

Thank you for the reply. I actually did it, but got an error:

??? Error using ==> print_info at 80
The steady state contains NaN or Inf

Could you please have a look at the attached files to advise what might be wrong there?

In the log-linearized version of model steady state values for some variables appear, this is why I need to calculate them (for which non-linear equation should be solved).

Thanks in advance.

Re: steady state values in a log-linearized model

PostPosted: Wed Sep 28, 2016 5:29 am
by jpfeifer
To correctly handle parameter dependence, you need to move the recursive parameter definitions that depend on n_ss into the steady_state_model-block:
Code: Select all
steady_state_model;
n_ss=cc_steady_state_helper(eta,beta,delta,theta);
L_ss=n_ss*eta*(1-beta*(1-delta))/(beta*(1-delta))*(n_ss^(1/(theta-1))*A_ss*(1-(theta-1)*(n_ss-1)/(theta*n_ss-theta+1)))^(-1);
mc_ss=(theta-1)*(n_ss-1)/(theta*n_ss-theta+1)*n_ss^(1/(theta-1));
d_ss=eta*(1-beta*(1-delta))/(beta*(1-delta));
y_ss=A_ss*L_ss*n_ss^(1/(theta-1));
w_ss=mc_ss*A_ss;
c_ss=w_ss/(L_ss^phi);
ne_ss=n_ss*delta/(1-delta);
c=0;
i=0;
pie=0;
d=0;
ne=0;
y=0;
w=0;
mc=0;
L=0;
mu=0;
n=0;
A=0;
end;

Otherwise, when you define e.g. mc_ss to depend on n_ss, that n_ss has not yet been computed.

Re: steady state values in a log-linearized model

PostPosted: Wed Sep 28, 2016 6:02 am
by use
Dear Johannes,

It works. Thanks for your valuable help!