steady state values in a log-linearized model

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

steady state values in a log-linearized model

Postby use » Sun Sep 25, 2016 5:20 pm

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.
use
 
Posts: 18
Joined: Mon Aug 20, 2012 4:50 pm

Re: steady state values in a log-linearized model

Postby jpfeifer » Mon Sep 26, 2016 12:16 pm

Please have a look at example3.mod in Dynare's example folder. There a steady state model-block is used to call a solver.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: steady state values in a log-linearized model

Postby use » Tue Sep 27, 2016 6:19 pm

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.
Attachments
cc_steady_state_helper.m
(270 Bytes) Downloaded 43 times
cc.mod
(1.54 KiB) Downloaded 40 times
use
 
Posts: 18
Joined: Mon Aug 20, 2012 4:50 pm

Re: steady state values in a log-linearized model

Postby jpfeifer » Wed Sep 28, 2016 5:29 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: steady state values in a log-linearized model

Postby use » Wed Sep 28, 2016 6:02 am

Dear Johannes,

It works. Thanks for your valuable help!
use
 
Posts: 18
Joined: Mon Aug 20, 2012 4:50 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests