An element of the Jacobian is not finite or NaN.

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.

An element of the Jacobian is not finite or NaN.

Postby aniarsh » Sun Nov 27, 2016 11:26 am

Dear all,

I am trying to estimate a model using Bayesian estimation method. The model with calibrations is working properly. But while estimating I get the following error: An element of the Jacobian is not finite or NaN.
And the explanation below the error: The problem most often occurs, because a variable with exponent smaller than 1 has been initialized to 0. Taking the derivative and evaluating it at the steady state then results in a division by 0.

But I don't see any issue with my variables and equations. Please help!

Your help will be much appreciated.

You can find the .mod file attached.
Attachments
estim.mod
(3.15 KiB) Downloaded 50 times
aniarsh
 
Posts: 4
Joined: Sun Nov 27, 2016 11:12 am

Re: An element of the Jacobian is not finite or NaN.

Postby jpfeifer » Sun Nov 27, 2016 11:49 am

You currently do not have a proper full calibration in your file before calling
Code: Select all
steady;

Therefore the warning
Warning: Some of the parameters have no value (bettald, bettalag, bettar, bettaz, bettayrus, alfapi, alfay, alfaz, lambda, delta, phi_i,
phi_pi, phi_y, bettaldrus, bettalagrus, bettarrus, alfapirus, alfayrus, phirus_i, phi_pirus, phi_yrus, rho_rrus, rho_r) when using steady.
If these parameters are not initialized in a steadystate file or a steady_state_model-block, Dynare may not be able to solve the 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: An element of the Jacobian is not finite or NaN.

Postby aniarsh » Sun Nov 27, 2016 1:35 pm

Dear Mr. Pfeifer,

Thank you very much for your quick response.

I added in the model parameter values (calibrations) for all the parameters, (still it does not make sense for me, since I followed the Dyanre User Guid and according to it I don't need to provide parameter values (only for the ones I don't want to estimate)), anyway, the model gave me graphs of the distributions. But now I have another error: You did not declare endogenous variables after the estimation/calib_smoother command.

Will be very happy if you can help me out.

By the way, last time I forgot to attach my data file. Maybe the problem comes from there..
Attachments
Ani.xls
(48 KiB) Downloaded 46 times
estim2.mod
(3.52 KiB) Downloaded 44 times
aniarsh
 
Posts: 4
Joined: Sun Nov 27, 2016 11:12 am

Re: An element of the Jacobian is not finite or NaN.

Postby aniarsh » Sun Nov 27, 2016 6:41 pm

Actually I found the reason of the error, it was occurring because in the data file for the date-s column I actually wrote "date", when I deleted it and left empty the code partly worked. I have other errors too, but as I understand there are connected with ill-chosen priors.
aniarsh
 
Posts: 4
Joined: Sun Nov 27, 2016 11:12 am


Return to Dynare help

Who is online

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