# Set the initial point for Random-walk Metropolis Hastings estimation

EDIT: solved but I cannot really mark one thread as a solution. Rather, for discussions and Dynare code changes, please check the last two threads or so by Johannes.

I was wondering whether there are ways to set the initial starting point for the RWMH estimation? Currently, my code gives “the hessian matrix at the “mode” is not positive definite” after computing mode with some Nelder-Mead method. But I don’t really want Dynare to check whether the mode is well-identified or not, i.e., I don’t want to compute that Hessian, and would like to skip that part but just jump into the RWMH. Are there ways to skip the mode computations and set the starting point directly? Thanks a lot!

1. You need to start somewhere and the initial point after mode-finding is usually preferable to other points.
2. Theory tells us that the Metropolis-Hastings algorithm will usually work with any positive definite proposal density covariance matrix, however using an poor one will decrease efficiency. Using the Hessian at the mode is typically very efficient, but as you saw, it is sometimes hard to obtain. In that case, you can tell Dynare to use a different matrix using the `mcmc_jumping_covariance`-option. For example, you can use
`mcmc_jumping_covariance=identity_matrix`
3. That being said, only do this if you are sure that the invalid Hessian is not due to deeper problems in the model like non-identified parameters or wrong observation equations.
1. You need to start somewhere and the initial point after mode-finding is usually preferable to other points.

Totally, but I’m doing some method comparisons that fixing a starting point might be a better idea here. Hence it would be great if I can use some custom starting points (or, at least, skip the Hessian computations that trigger numerical issues)

1. Theory tells us that the Metropolis-Hastings algorithm will usually work with any positive definite proposal density covariance matrix, however using an poor one will decrease efficiency. Using the Hessian at the mode is typically very efficient, but as you saw, it is sometimes hard to obtain. In that case, you can tell Dynare to use a different matrix using the `mcmc_jumping_covariance`-option. For example, you can use
`mcmc_jumping_covariance=identity_matrix`

Yes, this is the one that I’m using now, but the sampler will still compute the Hessian before the RWMH step.

Thanks!

1. If you set `mode_compute=0`, Dynare will use the provided starting values. That allows you start where you want.
2. To turn of computation of the Hessian when computing a mode, set
``````options_.cova_compute=0
``````

Thanks for your reply, and I still encounter an issue when I set `options_.cova_compute=0`. It seems that then Dynare alerts “MCMC cannot be started”. I tried to set `mcmc_jumping_covariance = identity_matrix` but it still alerts and quits.

Unfortunately, this is a bug. See https://git.dynare.org/Dynare/dynare/-/merge_requests/1787

Gotcha, I’ll use the modified file. Thanks a lot!