3

I have a simple question regarding to Metropolis–Hastings algorithm. Suppose the distribution only has one variable x and the value range of x is s=[-2^31,2^31].

In the sampling process, I need to propose a new value of x and then decide whether to accept it.

x_{t+1} =x_t+\epsilon 

If I want to implement it by myself, how to decide the value of \epsilon.

The basic solution is to pick a value from Uniform[-2^31,2^31] and set it to \epsilon. What if the value range is unbounded like [-inf, inf]?

How does the current MCMC library (e.g. pymc) solve that problem?

Amit Verma
  • 40,709
  • 21
  • 93
  • 115
Dingbao Xie
  • 716
  • 9
  • 21

2 Answers2

3

Suppose you have $d$ dimensional parameters, the optimal scale is approximate $2.4d^(−1/2)$ times the scale of the target distribution, which implies optimal acceptance rates of 0.44 for $d = 1$ and 0.23 for $d$ goes to \infinity.

reference: Automatic Step Size Selection in Random Walk Metropolis Algorithms, Todd L. Graves, 2011.

Z Cao
  • 51
  • 5
2

The best approach is to code a self-tuning algorithm that starts with an arbitrary variance for the step size variance, and tune this variance as the algorithm progresses. You are shooting for an acceptance rate of 25-50% for the Metropolis algorithm.

Chris Fonnesbeck
  • 4,143
  • 4
  • 29
  • 30