Steady state values in a log-linearized model


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:


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.

Please have a look at example3.mod in Dynare’s example folder. There a steady state model-block is used to call a solver.

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.
cc_steady_state_helper.m (270 Bytes)
cc.mod (1.54 KB)

To correctly handle parameter dependence, you need to move the recursive parameter definitions that depend on n_ss into the steady_state_model-block:

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.

Dear Johannes,

It works. Thanks for your valuable help!