Skip to main content
6 votes
Accepted

How to tune MCMC with unwieldy posterior

does using the log-density not break any of the assumptions of MH or other algorithms used for sampling from densities? And can one just take the exponential of the samples obtained via MH to get ...
Xi'an's user avatar
  • 106k
6 votes
Accepted

2 versions of Metropolis-Hastings : are they equivalent?

The two versions are equivalent. In version 2, you accept the proposed value with probability $\min(a, 1)$. In version 1, you accept the proposed value if $U<a$. Since $U\sim\mathcal{U}(0,1)$, the ...
Robin Ryder's user avatar
  • 2,086
4 votes
Accepted

How worried should I be about low acceptance rate in cold chain (parallel tempering MCMC sampler)

The rejection rate is only indirectly linked to convergence. Broadly speaking, diagnostics such as the rejection rate or autocorrelation plots tell you about whether your MCMC works efficiently, while ...
Florian Hartig's user avatar
4 votes
Accepted

How do I account for numerical overflow with Adaptive MCMC?

There is no issue in converting the entire problem to log-scale. In this case, with the prior $\pi_0$, the new point $z'$ and old point $z$ $$\log\alpha = \min \left \{0, \log \mathcal L(z') - \log \...
Forgottenscience's user avatar
3 votes
Accepted

Derivation of acceptance probability from Linero, Yang (2018)

The Metropolis-Rosenbluth-Hastings acceptance ratio is the traditional $$\frac{\text{target new}}{\text{target old}}\times\frac{\text{proposal old}}{\text{proposal new}}$$ where, most conveniently, ...
Xi'an's user avatar
  • 106k
3 votes

MCMC - How to derive the acceptance ratio from Markov chain detailed balance?

The acceptance probability $A(x\to y)$ is not derived from detailed balance. It is the opposite: given this choice of acceptance probability the Markov kernel satisfies detailed balance $$ p(x)\int q(...
Xi'an's user avatar
  • 106k
3 votes
Accepted

MCMC - How to derive the acceptance ratio from Markov chain detailed balance?

If $\mathop{P}\left(x\right)\mathop{q}\left(x\rightarrow y\right) > \mathop{P}\left(y\right)\mathop{q}\left(y\rightarrow x\right)$, then the process moves from $x$ to $y$ too often. Setting $\...
statmerkur's user avatar
  • 5,980
3 votes
Accepted

Why do we sample from the uniform distribution in Metropolis-Hastings for acceptance?

The (simplest) validation of the Metropolis-(Rosenbluth-)Hastings algorithm is that the associated Markov kernel $K$ satisfies the so-called detailed balance equation $$\forall\ x,x^\prime,\quad p(x)K(...
Xi'an's user avatar
  • 106k
3 votes
Accepted

How to understand the scaling in Metropolis Hastings MCMC

Assuming a target distribution with unrestricted support $\mathfrak X$, consider the simple random walk proposal written as $$y=x+\sigma\epsilon\,,$$ where $\epsilon$ is a unit-variance symmetric ...
Xi'an's user avatar
  • 106k
3 votes

Mean acceptance rate for Metropolis-Hastings algorithm

The average acceptance probability is, under stationarity (i.e., $\theta\sim\mathcal N(0,1)$) \begin{align*}\require{amsmath} \mathbb P(\text{accept }\theta^\prime) &= \mathbb P(U\le e^{\theta^2/2-...
Xi'an's user avatar
  • 106k
3 votes
Accepted

Metropolis Hastings for Poisson Distribution

Guessing from the R code and the question it sounds like one observed $$X\sim\mathcal P(\lambda)$$ as $x=60$ and the prior distribution on $\lambda$ is a Gamma distribution $\mathcal Ga(a,b)$ [using ...
Xi'an's user avatar
  • 106k
3 votes
Accepted

Do I need to evaluate acceptance rates in Metropolis within Gibbs algorithm?

Usually, you set the tuning parameter once and evaluate the overall acceptance probability ex post once over all iterations of the sampler. Here, you aim for the ''golden acceptance ratio'' of 23,4%. ...
yrx1702's user avatar
  • 700
3 votes
Accepted

Need to understand a statement for Random Walk Metropolis algorithm's proposal distribution?

Consider a "rotationally symmetric bivariate normal distribution". For your context, what this means is that the proposal distribution is bivariate normal with no correlation (see here maybe. ...
Greenparker's user avatar
  • 15.6k
2 votes
Accepted

Expression for the mean acceptance rate of the Metropolis-Hastings algorithm

When the support of $q(x,\cdot)$ differs from the support of $p(\cdot)$ then the expectation of the ratio is not necessarily one. As an illustration, take \begin{align} p(x) &= \frac{1}{3}\Bbb I_{(...
Xi'an's user avatar
  • 106k
2 votes

How does the celebrated result about the diffusion limit of the Random Walk Metroplis-Hastings algorithm help us to find the optimal scaling

(though, it's still not clear to me if we need additional assumptions on $f$ to ensure that $U_t$ weakly converges to $f$ and I would be happy about any comment related to that). This concerns the ...
ฯ€r8's user avatar
  • 1,346
2 votes
Accepted

Proposal in MCMC lives in bigger space than parameter space. Which transformations should I choose?

It is perfectly valid to reparametrize your model before implementing MCMC. Two caveats, as mentioned in the comments: (1) you need to calculate the Jacobian of the change of the variable; (2) ...
Robin Ryder's user avatar
  • 2,086
2 votes
Accepted

Metropolis Hastings - Acceptance ratio, proposal and lkelihood

The problem with your description of the Metropolis-Hastings algorithm is that your notation does not distinguish between the probability densities in the actual problem you are trying to solve, and ...
Ben's user avatar
  • 125k
2 votes
Accepted

How do we need to define the acceptance ratio of the Metropolis-Hastings algorithm for a vanishing proposal density?

While the Markov chain $(X_t)$ is producing values such that $p(x_t)=0$ it has clearly not "reached" stationarity, so it should keep moving over the state space. Any way to move around until the ...
Xi'an's user avatar
  • 106k
2 votes
Accepted

How can I find the acceptance probability for a joint Metropolis-Hastings proposal?

This is a single-step (independent) proposal, namely generating simultaneously $(X^\star,Y^\star,Z^\star)$ from the joint proposal with density $$p(x^\star,y^\star,z^\star)= p(z^\star|\alpha,\beta)p(x^...
Xi'an's user avatar
  • 106k
2 votes
Accepted

Is Metropolis-Hastings ever more efficient than rejection sampling in 2 dimensions?

First, one need define a precise notion of efficiency. For instance, if the goal is to produce an iid sample from a target distribution with density $\pi$, then rejection sampling (assuming it is ...
Xi'an's user avatar
  • 106k
1 vote
Accepted

Jacobian and proposal ratio of Birth/death step in RJMCMC of Gaussian mixture model

For the birth step, we have to create $๐‘ค_{๐‘—^โˆ—}$ and $(ฮผ_{๐‘—^โˆ—},ฯƒ_{๐‘—^โˆ—})$ pair and death step, pair of $๐‘ค_{๐‘—^โˆ—}$ and $(ฮผ_{๐‘—^โˆ—},ฯƒ_{๐‘—^โˆ—})$ are deleted. Correct. However, the probability $A$ in (...
Xi'an's user avatar
  • 106k
1 vote

How do we define the kernel to calculate the acceptance ratio for Metropolis-Hastings Markov Chain Monte Carlo?

To compute the Metropolis-Hastings ratio for a target density $f(\cdot)$ with kernel proposal $k(\cdot|\cdot)$ one need compute $$\dfrac{f(y)k(x|y)}{f(x)k(y|x)}$$ for an arbitrary pair $(x,y)$ or find ...
Xi'an's user avatar
  • 106k
1 vote

Simulated annealing acceptance probability puzzle

This alternative acceptance probability is Barkerโ€™s formula which got published in the Australian Journal of Physics at the beginning of Barkerโ€™s PhD at the University of Adelaide. As shown in the ...
Xi'an's user avatar
  • 106k
1 vote

Can a Metropolis-Hastings estimator converge if the proposal density vanishes whenver the target density vanishes?

I see no reason why this should be correct in general. The target distribution will then be a convex combination of $p$ and of the stationary distribution of $q(\cdot,\cdot)$, if any. If $q(\cdot,\...
Xi'an's user avatar
  • 106k
1 vote

Need to understand a statement for Random Walk Metropolis algorithm's proposal distribution?

The proposal for a general Metropolis-Hastings algorithm, \begin{align*}q\,:\, \mathcal X^2&\longmapsto \mathbb R_+\\ (x,y)&\longmapsto q(x,y)\end{align*} need not be symmetric provided it is ...
Xi'an's user avatar
  • 106k

Only top scored, non community-wiki answers of a minimum length are eligible