hello! have some question!

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.

hello! have some question!

Postby yoyoNDHU » Wed Oct 17, 2012 6:54 am

I done my model in nonliear form

but when i try to run it ,but it has some error
-------------------------
Warning: Divide by zero.
> In yoyo at 252
In dynare at 120
Warning: Divide by zero.
> In yoyo at 271
In dynare at 120
Warning: Divide by zero.
> In yoyo_static at 38
In dynare_solve at 84
In steady_ at 120
In steady at 54
In yoyo at 292
In dynare at 120
Warning: Divide by zero.
> In yoyo_static at 103
In dynare_solve at 84
In steady_ at 120
In steady at 54
In yoyo at 292
In dynare at 120
Warning: Divide by zero.
> In yoyo_static at 238
In dynare_solve at 84
In steady_ at 120
In steady at 54
In yoyo at 292
In dynare at 120
Warning: Divide by zero.
> In yoyo_static at 240
In dynare_solve at 84
In steady_ at 120
In steady at 54
In yoyo at 292
In dynare at 120
Warning: Divide by zero.
> In yoyo_static at 241
In dynare_solve at 84
In steady_ at 120
In steady at 54
In yoyo at 292
In dynare at 120
Warning: Divide by zero.
> In yoyo_static at 246
In dynare_solve at 84
In steady_ at 120
In steady at 54
In yoyo at 292
In dynare at 120
Warning: Divide by zero.
> In yoyo_static at 248
In dynare_solve at 84
In steady_ at 120
In steady at 54
In yoyo at 292
In dynare at 120
STEADY: numerical initial values incompatible with the following equations
Columns 1 through 17

3 4 5 6 7 8 9 10 11 12 13 18 19 20 21 22 23

Columns 18 through 20

24 25 26

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

Error in ==> steady_ at 120
[oo_.steady_state,check] = dynare_solve([M_.fname '_static'],...

Error in ==> steady at 54
steady_;

Error in ==> yoyo at 292
steady;

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


I find someone say maybe the initval value is wrong

then i use the steady state value solve by hand to plug in

some i can't solve i set by myself

but i t's still wrong...

please tell me how to solve it .. thank you for your help!
Attachments
yoyo.mod
(3.91 KiB) Downloaded 71 times
yoyoNDHU
 
Posts: 31
Joined: Tue Sep 04, 2012 7:07 am

Re: hello! have some question!

Postby jpfeifer » Sat Oct 20, 2012 10:31 pm

In your steady state computation, you have
Code: Select all
omds= (2.0*v + 2.0*(mu*v - 2.0*v - 1.0*mu*v^2 + v^2 + 1.0)^(1/2) - 2.0)/(mu*v);
v=(1+omds*(1-bet^(2)*gam-0.5*mu)+omds^(2)*(0.5*bet^(2)*gam-0.5));

omds uses v, but v is only computed in the next line and cannot be used before.
------------
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: hello! have some question!

Postby yoyoNDHU » Wed Oct 24, 2012 1:49 pm

Really really thanks to you !!~~jpfeifer
I solve the problem!^^!~~
but now I get some new problem
------------------------------
dynare yoyo1.mod

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.2.5).
Starting preprocessing of the model file ...
Found 37 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 yoyo1_static at 19
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 22
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 29
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 30
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 36
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 39
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 46
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 48
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 49
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 51
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 54
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 56
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 61
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 92
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 95
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 100
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 131
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 133
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Divide by zero.
> In yoyo1_static at 134
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Log of zero.
> In yoyo1_static at 157
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Log of zero.
> In yoyo1_static at 158
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Log of zero.
> In yoyo1_static at 160
In resid at 87
In yoyo1 at 244
In dynare at 120
Warning: Log of zero.
> In yoyo1_static at 161
In resid at 87
In yoyo1 at 244
In dynare at 120




Residuals of the static equations:

Equation number 1 : -Inf
Equation number 2 : NaN
Equation number 3 : NaN
Equation number 4 : -1.1429
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : NaN
Equation number 8 : NaN
Equation number 9 : NaN
Equation number 10 : NaN
Equation number 11 : NaN
Equation number 12 : 0
Equation number 13 : NaN
Equation number 14 : -Inf
Equation number 15 : NaN
Equation number 16 : NaN
Equation number 17 : -1.1429
Equation number 18 : 0
Equation number 19 : 0
Equation number 20 : NaN
Equation number 21 : NaN
Equation number 22 : NaN
Equation number 23 : NaN
Equation number 24 : NaN
Equation number 25 : 0
Equation number 26 : NaN
Equation number 27 : NaN
Equation number 28 : -1
Equation number 29 : -1
Equation number 30 : -1
Equation number 31 : -1
Equation number 32 : 0
Equation number 33 : 0
Equation number 34 : 0
Equation number 35 : NaN
Equation number 36 : NaN
Equation number 37 : 0

??? Error using ==> steady_ at 132
STEADY: convergence problems

Error in ==> steady at 54
steady_;

Error in ==> yoyo1 at 293
steady;

Error in ==> dynare at 120
evalin('base',fname) ;
-----------------------------------
why there all NaN and INF QQ..?
matlab say divide by zere and log of zero
but I don't know which equation is?
could you teach me how to solve it?
Thanks for your help!
Best YOYO
yoyoNDHU
 
Posts: 31
Joined: Tue Sep 04, 2012 7:07 am

Re: hello! have some question!

Postby jpfeifer » Wed Oct 24, 2012 6:22 pm

They are numbered as they appear in the model. Provide better starting values in the initval-block.
------------
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


Return to Dynare help

Who is online

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