Page 1 of 1

Difficulty in finding steady state with nonlinearity

PostPosted: Mon Jan 18, 2016 8:19 pm
by Marie
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.

Re: Difficulty in finding steady state with nonlinearity

PostPosted: Tue Jan 19, 2016 7:41 am
by jameszhow1985
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);

Re: Difficulty in finding steady state with nonlinearity

PostPosted: Tue Jan 19, 2016 9:42 am
by jpfeifer
Please take a look at example3.mod in the Dynare examples folder, which does exactly what jameszhow1985 proposes.

Re: Difficulty in finding steady state with nonlinearity

PostPosted: Tue Jan 19, 2016 5:59 pm
by Marie
Thank you so much for the timely help!!!