I’ve been trying to extend this 2014 JEDC by Fabio Milani
Which estimates a linear NK model with learning. I’ve tried to code the likelihood function as I interpret it and when maximizing using Matlab’s Fminunc routine gives me a Hessian whose inverse is not semi-positive definite, and therefore cannot be used for the proposal density in a Metropolis Hastings algorithm.
Have any others encountered a similar problem? I thought perhaps I could use the nearest Semi-positive definite matrix to the inverse hessian for the proposal density?