MCMC question

Steve Wang writes,

I’m running an MCMC (Metropolis algorithm) for parameters in a bounded space. What do you do when your proposed jump takes you off the edge of the space?

For instance, say you are estimating a proportion. Right now the chain is at p = .9, and your proposed jump takes you to p > 1. Should you:

1) Consider the proposed jump to be p = 1?
2) Ignore the proposed jump and try another one?

If (2), does this count as a rejection in your acceptance rate?

I’m afraid either choice will change the proposal distribution, thus throwing off convergence.

My response: there’s more than one way of doing this, but all the solutions are based on taking the Metropolis computations literally. One approach is to just allow jumps outside the range, and just define the probability function as zero in this illegal range. Thus all such jumps will be rejected, meaning that if you try to jump outside the range, you must count that as one more stay at your current spot. The other natural approach is to bounce off the boundary (see p. 67 of this presentation). Then you just have to be careful that your jumping rule is symmetric: that the probability of going from a to b is the same as from going from b to a.

4 thoughts on “MCMC question

  1. You could always change your parameter space too. p may be bounded by 1, but there may be a reasonable transformation of p (such as the log-odds) that isn't bounded.

  2. You can also use a truncated Normal distribution near the boundary (assuming you're using a Normal distribution elsewhere). You have to correct for the non-symmetry, though. The correction is discussed in "Accelerating Monte Carlo Markov chain convergence for cumulative-link generalized linear models" Mary Kathryn Cowles, Statistics and Computing 1996 6:101-111.

  3. the sigmoid function 1/(1+exp(-t)) can be used as a bi-directional map from real numbers to probabilities. it might make sense to take steps in the sigmoid-transformed space.

  4. For what it's worth, any cumulative distribution function on the real numbers could be used as a bi-directional map from real numbers to probabilities, not just the sigmoid function.

Comments are closed.