# Metropolis Error

**URL:** <https://forum.dynare.org/t/metropolis-error/316>\
**Category:** Dynare help (legacy posts)\
**Created:** [18 April 2007 15:39 UTC](https://forum.dynare.org/t/metropolis-error/316 "2007-04-18T15:39:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pun\_star](https://forum.dynare.org/letter_avatar_proxy/v4/letter/p/3ec8ea/32.png) [@pun\_star](https://forum.dynare.org/u/pun_star)\
**Post date:** [18 April 2007 15:39 UTC](https://forum.dynare.org/t/metropolis-error/316/1 "2007-04-18T15:39:29Z")

</div>

i get the following error when i do MCMC

Warning: Log of zero.

> In metropolis at 822  
> In dynare\_estimation at 778  
> In Version\_18\_m at 403  
> In dynare at 26

i think this has to do with the log data density compution. have you guys encountered it?

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [15 May 2007 05:11 UTC](https://forum.dynare.org/t/metropolis-error/316/2 "2007-05-15T05:11:54Z")

</div>

This usually happens when the Metropolis iterations don’t move enough. It is often due to a bad mode. Check for 0 standard deviation in the posterior mode report.

Best

Michel
