Page 1 of 1

Problem with Code

PostPosted: Wed Apr 17, 2013 7:39 pm
by despeinada
Hi,

I get this error message but i do not know how to solve it:

Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.

Starting Dynare (version 4.1.1).
Starting preprocessing of the model file ...
Found 14 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.

Warning: Divide by zero.
> In baseline1_static at 61
In resol at 91
In check at 45
In baseline1 at 134
In dynare at 132
Warning: Divide by zero.
> In baseline1_static at 61
In dynare_solve at 70
In resol at 93
In check at 45
In baseline1 at 134
In dynare at 132
Warning: Divide by zero.
> In baseline1_static at 114
In dynare_solve at 70
In resol at 93
In check at 45
In baseline1 at 134
In dynare at 132
Warning: Divide by zero.
> In baseline1_static at 115
In dynare_solve at 70
In resol at 93
In check at 45
In baseline1 at 134
In dynare at 132
Warning: Divide by zero.
> In baseline1_static at 116
In dynare_solve at 70
In resol at 93
In check at 45
In baseline1 at 134
In dynare at 132
STEADY: numerical initial values incompatible with the following equations
3 7 13

??? Error using ==> dynare_solve
exiting ...

Error in ==> resol at 93
[dr.ys,check1] = dynare_solve(fh,dr.ys,options_.jacobian_flag,...

Error in ==> check at 45
[dr, info] = resol(oo_.steady_state,1);

Error in ==> baseline1 at 134
check;

Error in ==> dynare at 132
evalin('base',fname) ;

Thanks in advance for your time and help. Best,

Re: Problem with Code

PostPosted: Thu Apr 18, 2013 5:40 pm
by fabiover
I run your code with Dynare 4.3.2 and got the following message:


STEADY: numerical initial values or parameters incompatible with the following equations
3 7 13

Please check for example
i) if all parameters occurring in these equations are defined
ii) that no division by an endogenous variable initialized to 0 occurs

Re: Problem with Code

PostPosted: Fri Apr 19, 2013 5:28 am
by despeinada
thanks a lot for your reply. I have checked and there are no undefined parameterns but equation 13 could be the problem becuase it may yield the division by zero. I set initval of bu=1 and bs=1, but still gives me problems...

Re: Problem with Code

PostPosted: Sat Apr 20, 2013 7:53 am
by jpfeifer
You have for example k^(alpha-1) in equation 3. As the exponent is smaller than 0, this is equal 1/(k^(1-alpha)) which is 1/0. Please provide initial values for all variables. If a variable cannot be 0, set a small positive initval.

Re: Problem with Code

PostPosted: Sun Apr 21, 2013 8:58 am
by despeinada
thanks a lot! i will try to give all variables an intial value...