Difficulty in finding steady state with nonlinearity

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.

Difficulty in finding steady state with nonlinearity

Postby Marie » Mon Jan 18, 2016 8:19 pm

I have difficulty in finding steady state. I want to set my parameter to make a certain variable equal to some value at the steady state. And I used the "steady_state_model" block to do the calibration. But the parameter and the variable has a nonlinear relationship and I cannot have an analytical solution for the parameter. When I try to use fsolve to get the specific value for the parameter, dynare reports error because one of the static equation does not equal to zero. How can I solve this problem.

This is the model:
((1-phi)/phi)*(1-n)^(-phi)/(c^(phi-1)) = (1-alpha)*y/n

In steady state, I want to have n=1/3 and I already have the value for y. So I need to solve for phi in this case. But I cannot give phi an analytical expression.
Marie
 
Posts: 2
Joined: Mon Jan 18, 2016 8:06 pm

Re: Difficulty in finding steady state with nonlinearity

Postby jameszhow1985 » Tue Jan 19, 2016 7:41 am

you can solve this problem using the following way:

steady_state_model
....
phi=find_phi(n,c,alp,y);
....
end

then you should build a file named find_phi.m

function phi=find_phi(n,c,alp,y);

phi=fsolve(@(phi) ((1-phi)/phi)*(1-n)^(-phi)/(c^(phi-1))-(1-alpha)*y/n,0.5);
jameszhow1985
 
Posts: 19
Joined: Sat Oct 24, 2015 1:57 pm

Re: Difficulty in finding steady state with nonlinearity

Postby jpfeifer » Tue Jan 19, 2016 9:42 am

Please take a look at example3.mod in the Dynare examples folder, which does exactly what jameszhow1985 proposes.
------------
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: Difficulty in finding steady state with nonlinearity

Postby Marie » Tue Jan 19, 2016 5:59 pm

Thank you so much for the timely help!!!
Marie
 
Posts: 2
Joined: Mon Jan 18, 2016 8:06 pm


Return to Dynare help

Who is online

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