Page 1 of 1
The Jacobian matrix evaluated at the steady state contains e
Posted:
Thu Oct 29, 2015 8:32 am
by amilaa
Dear All,
Urgent help required, i get the below error for my model on a small open economy
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND =
4.181195e-42.
> In evaluate_steady_state at 85
In resol at 104
In stoch_simul at 88
In ff at 358
In dynare at 180
Error using print_info (line 51)
The Jacobian matrix evaluated at the steady state contains elements that are not real or
are infinite
Error in stoch_simul (line 98)
print_info(info, options_.noprint, options_);
Error in ff (line 358)
info = stoch_simul(var_list_);
Error in dynare (line 180)
evalin('base',fname) ;
Re: The Jacobian matrix evaluated at the steady state contai
Posted:
Thu Oct 29, 2015 9:06 am
by jpfeifer
Why do you say
- Code: Select all
model(linear);
when your model is clearly not linear? More importantly, the file you posted is not able to compute the steady state, so I don't get the message you get.
Re: The Jacobian matrix evaluated at the steady state contai
Posted:
Thu Oct 29, 2015 11:13 am
by amilaa
Thanks for the reply. I am new to the modeling did not had a clear idea. Do you have any idea why can't I arrive at steady state when i remove (linear) and just run the model
Re: The Jacobian matrix evaluated at the steady state contai
Posted:
Thu Oct 29, 2015 11:53 am
by amilaa
when i remove linear and run i get below
Residuals of the static equations:
Equation number 1 : -0.66575
Equation number 2 : -4.5533e-06
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : -0.055122
Equation number 6 : 0
Equation number 7 : 5.2715e-06
Equation number 8 : 0.056817
Equation number 9 : -1.562
Equation number 10 : -0.10805
Equation number 11 : 0.00056316
Equation number 12 : 0.016749
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : -8.0805e-07
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
Re: The Jacobian matrix evaluated at the steady state contai
Posted:
Fri Oct 30, 2015 8:24 am
by jpfeifer
You need to check your model equations and provide better starting values for steady state finding. Concentrate on the equations with big residuals.
Re: The Jacobian matrix evaluated at the steady state contai
Posted:
Fri Oct 30, 2015 2:56 pm
by amilaa
I simplified my model and I am getting a new error now. I have attached the new model and I had tried range of initvalues for "l" and getting same error massage. Hope you can advice on this.
STEADY: The Jacobian contains Inf or NaN. The problem arises from:
STEADY: Derivative of Equation 5 with respect to Variable l (initial value of l: 0.1)
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.
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 hh (line 198)
steady;
Error in dynare (line 180)
evalin('base',fname) ;
Re: The Jacobian matrix evaluated at the steady state contai
Posted:
Sat Oct 31, 2015 5:00 pm
by jpfeifer
That's because you have
- Code: Select all
a_p(+1)*l(+1)
where a_p is an exogenous variable with steady state 0. Because of this, the whole expression is 0. I guess you are missing an exp() around a_p here.
Re: The Jacobian matrix evaluated at the steady state contai
Posted:
Tue Nov 03, 2015 5:18 pm
by amilaa
Thanx for the advice, I had corrected that but still it results in below error, Hope you can advice on that as well. I have attached amended mod file as well. Really appreciate your help.
An infinite element was encountered when trying to solve equation(s) 7
with respect to the variable(s): w.
The values of the endogenous variables when the problem was encountered were:
v 0.8
c 1.9
b 0.7
l 1
m 0.4
w 0.8
p 0.2
b_b 0.9
h 0.2
Error using lnsrch1 (line 71)
Some element of Newton direction isn't finite. Jacobian maybe singular or there is a
problem with initial values
Error in solve1 (line 107)
[x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin{:});
Error in dynare_solve (line 150)
[x,info]=solve1(func,x,j1(r(i):r(i+1)-1),j2(r(i):r(i+1)-1),jacobian_flag, ...
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 hh (line 198)
steady;
Error in dynare (line 180)
evalin('base',fname) ;