fs2000 hessian not positive definite

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.

fs2000 hessian not positive definite

Postby kgarb » Thu May 28, 2015 9:26 pm

Hi all,

I ran the fs2000 code straight out of the box and got the "POSTERIOR KERNEL OPTIMIZATION PROBLEM!" notification that the hessian matrix at the "mode" is not positive definite (see below for full output - does this forum not allow [spoiler] tags?).

I am using Dynare 4.4.3 and Octave 3.8.2 on Windows 7 (64-bit), and did not modify fs2000, fsdat, or fs2000_steadystate.m before estimation. What could be causing this?

Thank you for your input!

Code: Select all
Improvement on iteration 310 =        0.000000088
improvement < crit termination
Objective function at mode: -1304.862915

POSTERIOR KERNEL OPTIMIZATION PROBLEM!
 (minus) the hessian matrix at the "mode" is not positive d
efinite!
=> posterior variance of the estimated parameters are not p
ositive.
You should try to change the initial values of the paramete
rs using
the estimated_params_init block, or use another optimizatio
n routine.
warning: The results below are most likely wrong!
warning: called from
    dynare_estimation_1 at line 694 column 9
    dynare_estimation at line 89 column 5
    fs2000 at line 221 column 1
    dynare at line 180 column 1

RESULTS FROM POSTERIOR ESTIMATION
parameters
  prior mean     mode    s.d. prior pstdev

alp   0.356   0.3842  0.0203 beta  0.0200
bet   0.993   0.9916  0.0020 beta  0.0020
gam   0.009   0.0053  0.0009 norm  0.0030
mst   1.000   1.0150  0.0006 norm  0.0070
rho   0.129   0.3359  0.0000 beta  0.2230
psi   0.650   0.6673  0.0500 beta  0.0500
del   0.010   0.0026  0.0016 beta  0.0050

standard deviation of shocks
  prior mean     mode    s.d. prior pstdev

e_a   0.035   0.0132  0.0009 invg     Inf
e_m   0.009   0.0054  0.0000 invg     Inf


Log data density [Laplace approximation] is 1260.993884.

Total computing time : 0h05m27s
Note: warning(s) encountered in MATLAB/Octave code
kgarb
 
Posts: 34
Joined: Thu May 28, 2015 9:19 pm

Re: fs2000 hessian not positive definite

Postby jpfeifer » Fri May 29, 2015 3:10 pm

This is strange, because usually
Code: Select all
Final value of minus the log posterior (or likelihood):-1233.817468

This is far away from what you report. Could it be that there is a function conflict somewhere?
------------
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: fs2000 hessian not positive definite

Postby kgarb » Fri May 29, 2015 6:42 pm

It turns out the fs2000 file from the Dynare "documentation and support/examples" page and the fs2000 file in the examples folder are different. The one from the Dynare page has the following code in the Metropolis-Hastings settings:

Code: Select all
estimation(datafile=fsdat,nobs=192,loglinear,mh_replic=0,mh_nblocks=5,mh_jscale=0.8);


while the one in the examples folder has:

Code: Select all
estimation(order=1, datafile=fsdat_simul, nobs=192, loglinear, mh_replic=2000, mh_nblocks=2, mh_jscale=0.8);


When I ran the one from the examples folder I got the same minus of log posterior:
Code: Select all
Objective function at mode: -1233.817468


So it looks like a different set of initial conditions, which are then used as the set of estimated priors(?) (I'm still not entirely clear conceptually on what M-H does in terms of the estimation, though I understand monte carlo and markov chain methods) due to no M-H replications providing increased estimation accuracy(?) is resulting in a non-convergent model?
kgarb
 
Posts: 34
Joined: Thu May 28, 2015 9:19 pm

Re: fs2000 hessian not positive definite

Postby jpfeifer » Sun May 31, 2015 11:13 am

More importantly, it seems there are different data files involved, one on theoretical data and one on model generated data.
------------
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: fs2000 hessian not positive definite

Postby kgarb » Mon Jun 01, 2015 9:17 pm

Ah, I hadn't even bothered to check the data because I figured the fs2000 example through Dynare and through the Dynare website would have more or less identical components. That's very confusing for a first-time user to download an example and have it not work though.

Thank you for your input Prof. Pfeifer.
kgarb
 
Posts: 34
Joined: Thu May 28, 2015 9:19 pm

Re: fs2000 hessian not positive definite

Postby jpfeifer » Wed Jun 03, 2015 10:00 am

There is something wrong with Dynare 4.4.3 as it seems to be unable to find the correct mode with mode_compute=4. With the unstable version mode-finding continues and finds a positive definite one. We may add a warning.
------------
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 8 guests