Problem with steady state

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.

Problem with steady state

Postby eta » Fri Oct 10, 2014 8:48 am

Hi, running the attached mod.file results in the following errors:

Error using dynare_solve (line 60)
An element of the Jacobian is not finite or NaN

Error in evaluate_steady_state (line 66)
[ys,check] = dynare_solve([M.fname
'_static'],...

Error in steady_ (line 54)
[steady_state,params,info] =
evaluate_steady_state(oo_.steady_state,M_,options_,oo_,~options_.steadystate.nocheck);
Error in steady (line 81)
[steady_state,M_.params,info] =
steady_(M_,options_,oo_);

Error in shock1 (line 154)
steady;

Error in dynare (line 180)
evalin('base',fname) ;

There is clearly a problem in computing the steady state. I only wrote the initial conditions for exogenous variables (deterministic setup). Do you have any suggestion to fix these problems ?
Thanks in advance.
Last edited by eta on Sat Jan 16, 2016 3:34 pm, edited 1 time in total.
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Problem with steady state

Postby jpfeifer » Fri Oct 10, 2014 9:00 am

STEADY: The Jacobian contains Inf or NaN. The problem arises from:

Derivative of Equation 1 with respect to Variable gdp (initial value of gdp: 0)

STEADY: The problem most often occurs, because a variable with
STEADY: exponent smaller than 1 has been initialized to 0. Taking the derivative
STEADY: and evaluating it at the steady state then results in a division by 0.


Put gdp=1 into initval.
------------
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: Problem with steady state

Postby eta » Fri Oct 10, 2014 9:05 am

New problems:

Error using print_info (line 74)
Impossible to find the steady state. Either the
model doesn't have a steady state, there are an
infinity of steady states, or the guess values
are too far from the solution

Error in steady (line 92)
print_info(info,options_.noprint, options_);

Error in shock1 (line 155)
steady;

Error in dynare (line 180)
evalin('base',fname) ;
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Problem with steady state

Postby eta » Fri Oct 10, 2014 9:11 am

I forgot to say that gdp_ss=1 is not the true value of gdp at the steady state. I have not yet computed the steady states, but putting gdp_ss=1 eliminates log(gdp). I wanted to check if the syntax was correct and then proceed to the computation of the steady states in a separate file.
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Problem with steady state

Postby jpfeifer » Fri Oct 10, 2014 9:19 am

But the new message is a problem you have to solve. Provide an analytical steady state of better starting values. Also, make sure your equations are correct.
------------
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: Problem with steady state

Postby eta » Fri Oct 10, 2014 12:37 pm

I'm not succeeding at finding the steady states. In the model, there are 7 equations in 7 variables but computing the deterministic steady states results in more equations than variables. How is it possible ? Is there anything else I can do to compute them?
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Problem with steady state

Postby eta » Fri Oct 10, 2014 12:40 pm

I meant more variables than equations.
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Problem with steady state

Postby jpfeifer » Fri Oct 10, 2014 1:55 pm

What do you mean? If the dynamic model has as many equations as unknowns, the same is true for the static model.
------------
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: Problem with steady state

Postby eta » Fri Oct 10, 2014 2:26 pm

I don't know what's wrong in the computations. The value of the exogenous variables z,d and eta is fixed. gdp_hat becomes equal to 0 at the steady state and simplifiyng I get one equation for gdp_ss as a function of h_ss and pi_ss, another equation for h_ss as a function of pi_ss and R_ss and another for R_ss as a function of pi_ss. So there is one equation missing, but I cannot find it!!
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Problem with steady state

Postby jpfeifer » Fri Oct 10, 2014 3:30 pm

You seem to be confusing something. gdp_ss is a parameter that is extraneous to your model and can not be endogenously determined.
------------
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: Problem with steady state

Postby eta » Fri Oct 10, 2014 3:57 pm

Yes, I'm confusing something. I fixed gdp_ss equal to 1 before and that produced an error. You told me to put gdp=1 in initval and that resulted again in an error:
Error using print_info (line 74)
Impossible to find the steady state. Either the
model doesn't have a steady state, there are an
infinity of steady states, or the guess values
are too far from the solution

Should I compute the exact steady states, fixing gdp_ss to, say, 1 and then writing the values of pi, h and R in initval ?
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Problem with steady state

Postby eta » Sat Oct 11, 2014 10:30 am

So, I computed the steady states with fsolve, putting an arbitrary value for gdp_ss. Then I wrote the obtained values in initval, but the problem of steady states persists.
Error using print_info (line 74)
Impossible to find the steady state. Either the
model doesn't have a steady state, there are an
infinity of steady states, or the guess values
are too far from the solution

Error in steady (line 92)
print_info(info,options_.noprint, options_);

Error in shock1 (line 158)
steady;

Error in dynare (line 180)
evalin('base',fname) ;

What should I do ?
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Problem with steady state

Postby jpfeifer » Sat Oct 11, 2014 3:04 pm

You are the model builder. You need to sit down and think about what are the endogenous variables and what are parameters fixed outside of the model. Currently, you seem to be mixing the two. There is only one correct way. If you fix a value for gdp_ss and "compute the steady state with fsolve" and these values are not a steady state for Dynare, either your previous computations are wrong or the equations you entered into Dynare.
------------
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: Problem with steady state

Postby eta » Sat Oct 11, 2014 3:54 pm

What do you mean exactly by "mixing the two"? If gdp_ss, as you said, cannot be endogenously determined I have to fix a value. Then I compute the steady states for the exogenous variables h, pi and R and write the obtained values in initval. Is this the correct procedure ?
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Problem with steady state

Postby jpfeifer » Sat Oct 11, 2014 5:37 pm

I don't know your model, so I am mostly guessing here. But it seems you have a case where you moved from a non-linear model, where gdp is a variable endogenously determined to a linearized version where gdp_ss becomes a parameter (which typically depends on the other deep parameters of the model). In the process, the variable gdp is redefined.

If you are able to compute the steady state for all variables conditional on the parameters, including gdp_ss, you should write this analytical solution into a steady_state_model block. If you can only do this numerically, use the initval block. My comment about consistency of these values with the model equations stays the same.
------------
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

Next

Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests

cron