NaN or Inf asserted in first order derivatives
Posted: Sun Jun 29, 2014 9:58 pm
Hey all,
I'm trying to run the following attached mod file with dynare++ order=2, but get an error:
Caught (not yet fatal) Kord exception: At ./first_order.cweb:55:(255):NaN or Inf asserted in first order derivatives in FirstOrder::solve
Caugth Kord exception: At ./approximation.cweb:82:(255):Folded decision rule has not been created in Approximation::getFoldDecisionRule
Can someone please help me figure out what is wrong here, or which FOC in particular is causing the probelm? Is there an easy way to debug or understand the source of the problem? I'm pretty new to dynare/dynare++ so this might be trivial or not.
Thanks!
Dan
Here is a relevant part from the jnl file:
0.32201:S00014:-1.:00772: : Non-linear solver for deterministic steady state
0.32201:M00015:-1.:771.9: : Iter lambda residual
0.32201:M00016:-1.:771.9: : ---------------------------
0.32201:M00017:-1.:771.9: : 0 N/A 3.61343e-015
0.32301:E00014:-1.:771.9:000000: Non-linear solver for deterministic steady state
0.32901:S00018:-1.:771.4: : Recovering first order derivatives
0.33101:M00019:-1.:771.1: : Blanchard-Kahn condition not satisfied, model not stable: sdim=5 npred=6
0.33101:M00020:-1.:771.1: : 0 (-0.000000,0.000000) / 4.679691 0.000000
0.33101:M00021:-1.:771.1: : 1 (0.000018,0.000000) / 0.000201 0.091333
0.33101:M00022:-1.:771.1: : 2 (0.817360,0.000000) / 6.948142 0.117637
0.33101:M00023:-1.:771.1: : 3 (0.092030,0.000000) / 0.115037 0.799981
0.33101:M00024:-1.:771.1: : 4 (3.265636,0.000000) / 4.082046 0.799999
0.33101:M00025:-1.:771.1: : ---------------------------------------------------- sdim
0.33101:M00026:-1.:771.1: : 5 (-0.004976,0.000000) / 0.000000 1.#INF00
0.33101:M00027:-1.:771.1: : ---------------------------------------------------- npred
0.33101:M00028:-1.:771.1: : 6 (1.121392,0.000000) / 0.130598 8.586460
0.33101:M00029:-1.:771.1: : 7 (1.683941,0.316059) / 1.704757 1.005036
0.33101:M00030:-1.:771.1: : 8 (1.683941,-0.316059) / 1.704757 1.005036
0.33101:M00031:-1.:771.1: : 9 (1.199811,0.000000) / 0.950250 1.262627
0.33101:M00032:-1.:771.1: : 10 (1.000003,0.000000) / 0.090017 11.108678
0.33101:M00033:-1.:771.1: : 11 (-0.824416,0.000000) / 0.000000 1.#INF00
0.33101:M00034:-1.:771.1: : 12 (8.232823,0.000000) / 0.000000 1.#INF00
0.33101:M00035:-1.:771.1: : 13 (2.152230,0.000000) / 0.000000 1.#INF00
0.33101:M00036:-1.:771.1: : 14 (1.000001,0.000000) / 0.000000 1.#INF00
0.33101:M00037:-1.:771.1: : 15 (-1.351605,0.000000) / 0.000000 1.#INF00
0.33101:M00038:-1.:771.1: : 16 (1.000000,0.000000) / 0.000000 1.#INF00
0.33101:M00039:-1.:771.1: : 17 (-3.992209,0.000000) / 0.000000 1.#INF00
0.33101:M00040:-1.:771.1: : 18 (0.004434,0.000000) / 0.000000 1.#INF00
0.33101:M00041:-1.:771.1: : 19 (0.997632,0.000000) / 0.000000 1.#INF00
0.33101:M00042:-1.:771.1: : 20 (0.992116,0.000000) / 0.000000 1.#INF00
0.33101:M00043:-1.:771.1: : 21 (3.797653,0.000000) / 0.000000 1.#INF00
0.33101:M00044:-1.:771.1: : 22 (1.000000,0.000000) / 0.000000 1.#INF00
0.33101:M00045:-1.:771.1: : 23 (1.756734,0.000000) / 0.000000 1.#INF00
0.33101:M00046:-1.:771.1: : 24 (0.278306,0.000000) / 0.000000 1.#INF00
0.33101:M00047:-1.:771.1: : 25 (-0.237399,0.000000) / 0.000000 1.#INF00
0.33101:M00048:-1.:771.1: : 26 (0.905539,0.000000) / 0.000000 1.#INF00
0.33101:E00018:-1.:771.1:000000: Recovering first order derivatives
0.33201:M00049:-1.:771.1: : Solution routine not finished (NaN or Inf asserted in first order derivatives in FirstOrder::solve), see what happens
I'm trying to run the following attached mod file with dynare++ order=2, but get an error:
Caught (not yet fatal) Kord exception: At ./first_order.cweb:55:(255):NaN or Inf asserted in first order derivatives in FirstOrder::solve
Caugth Kord exception: At ./approximation.cweb:82:(255):Folded decision rule has not been created in Approximation::getFoldDecisionRule
Can someone please help me figure out what is wrong here, or which FOC in particular is causing the probelm? Is there an easy way to debug or understand the source of the problem? I'm pretty new to dynare/dynare++ so this might be trivial or not.
Thanks!
Dan
Here is a relevant part from the jnl file:
0.32201:S00014:-1.:00772: : Non-linear solver for deterministic steady state
0.32201:M00015:-1.:771.9: : Iter lambda residual
0.32201:M00016:-1.:771.9: : ---------------------------
0.32201:M00017:-1.:771.9: : 0 N/A 3.61343e-015
0.32301:E00014:-1.:771.9:000000: Non-linear solver for deterministic steady state
0.32901:S00018:-1.:771.4: : Recovering first order derivatives
0.33101:M00019:-1.:771.1: : Blanchard-Kahn condition not satisfied, model not stable: sdim=5 npred=6
0.33101:M00020:-1.:771.1: : 0 (-0.000000,0.000000) / 4.679691 0.000000
0.33101:M00021:-1.:771.1: : 1 (0.000018,0.000000) / 0.000201 0.091333
0.33101:M00022:-1.:771.1: : 2 (0.817360,0.000000) / 6.948142 0.117637
0.33101:M00023:-1.:771.1: : 3 (0.092030,0.000000) / 0.115037 0.799981
0.33101:M00024:-1.:771.1: : 4 (3.265636,0.000000) / 4.082046 0.799999
0.33101:M00025:-1.:771.1: : ---------------------------------------------------- sdim
0.33101:M00026:-1.:771.1: : 5 (-0.004976,0.000000) / 0.000000 1.#INF00
0.33101:M00027:-1.:771.1: : ---------------------------------------------------- npred
0.33101:M00028:-1.:771.1: : 6 (1.121392,0.000000) / 0.130598 8.586460
0.33101:M00029:-1.:771.1: : 7 (1.683941,0.316059) / 1.704757 1.005036
0.33101:M00030:-1.:771.1: : 8 (1.683941,-0.316059) / 1.704757 1.005036
0.33101:M00031:-1.:771.1: : 9 (1.199811,0.000000) / 0.950250 1.262627
0.33101:M00032:-1.:771.1: : 10 (1.000003,0.000000) / 0.090017 11.108678
0.33101:M00033:-1.:771.1: : 11 (-0.824416,0.000000) / 0.000000 1.#INF00
0.33101:M00034:-1.:771.1: : 12 (8.232823,0.000000) / 0.000000 1.#INF00
0.33101:M00035:-1.:771.1: : 13 (2.152230,0.000000) / 0.000000 1.#INF00
0.33101:M00036:-1.:771.1: : 14 (1.000001,0.000000) / 0.000000 1.#INF00
0.33101:M00037:-1.:771.1: : 15 (-1.351605,0.000000) / 0.000000 1.#INF00
0.33101:M00038:-1.:771.1: : 16 (1.000000,0.000000) / 0.000000 1.#INF00
0.33101:M00039:-1.:771.1: : 17 (-3.992209,0.000000) / 0.000000 1.#INF00
0.33101:M00040:-1.:771.1: : 18 (0.004434,0.000000) / 0.000000 1.#INF00
0.33101:M00041:-1.:771.1: : 19 (0.997632,0.000000) / 0.000000 1.#INF00
0.33101:M00042:-1.:771.1: : 20 (0.992116,0.000000) / 0.000000 1.#INF00
0.33101:M00043:-1.:771.1: : 21 (3.797653,0.000000) / 0.000000 1.#INF00
0.33101:M00044:-1.:771.1: : 22 (1.000000,0.000000) / 0.000000 1.#INF00
0.33101:M00045:-1.:771.1: : 23 (1.756734,0.000000) / 0.000000 1.#INF00
0.33101:M00046:-1.:771.1: : 24 (0.278306,0.000000) / 0.000000 1.#INF00
0.33101:M00047:-1.:771.1: : 25 (-0.237399,0.000000) / 0.000000 1.#INF00
0.33101:M00048:-1.:771.1: : 26 (0.905539,0.000000) / 0.000000 1.#INF00
0.33101:E00018:-1.:771.1:000000: Recovering first order derivatives
0.33201:M00049:-1.:771.1: : Solution routine not finished (NaN or Inf asserted in first order derivatives in FirstOrder::solve), see what happens