Skip to main content

Questions tagged [metropolis-hastings]

A special type of Markov Chain Monte Carlo (MCMC) algorithm used to simulate from complex probability distributions. It is validated by Markov chain theory and offers a wide range of possible implementations.

Filter by
Sorted by
Tagged with
1 vote
0 answers
45 views

My MCMC Simulation

I am new to MCMC Simulation and Bayesian Analysis, so I wonder if my simulation has converged. My posterior is highly correlated by nature, so I'm facing some difficulty to ensure a sufficient number ...
Sobol's user avatar
  • 41
1 vote
1 answer
25 views

Priors DURING Metropolis-Hastings-Random Walk chain (MCMC)

Suppose we are running a Metropolis-Hastings Random Walk chain (MHRW) targeting the unknown posterior distribution of a $\theta$, using data $Y$ and likelihood $L$. Since we do not know the posterior ...
Alecos Papadopoulos's user avatar
0 votes
0 answers
5 views

Proving whether or not a markov chain is irreducible/recurrent? (Metropolis-within-Gibbs)

We want to generate samples from a standard normal distribution using a variation on slice sampling. To do this, the following Gibbs scheme is proposed to sample uniformly from the set $S = \{(u,x)\...
Bajas's user avatar
  • 66
2 votes
0 answers
45 views

How to tune the unadjusted Langevin algorithm?

I want to start investigating the (unadjusted) simulation of the Langevin process $${\rm d}X_t=b(X_t){\rm d}t+\sigma{\rm d}W_t,$$ where $$b:=\frac{\sigma^2}2\nabla\ln p.$$ I don't want to simulate ...
0xbadf00d's user avatar
  • 303
0 votes
0 answers
18 views

Is it possible to use Particle Marginal Metropolis Hastings to estimate the transition matrix and input?

A state space model is defined as: $$x_{t+1} = A_tx_t + B_tu_t$$ $$y_{t+1} = H_tx_{t+1}$$ So my question is: is it possible to use Particle Marginal Metropolis Hastings to estimate the transition ...
William Zhao's user avatar
2 votes
1 answer
53 views

Metropolis-Hastings algorithm doesn't converge to the global minimum

I calculated the total root mean squared error of 24 parameters that are estimated with metropolis hastings, I ran the algorithm for 100.000 iterations, and as the chain forward it reached a global ...
William Zhao's user avatar
0 votes
0 answers
27 views

Particle Marginal Metropolis Hastings - How to multiply the proposal distribution by the distribution of x?

When we are using particle marginal metropolis hastings, we will approximate the distribution of x with particle filter, in this pdf written below says: In such situations it is natural to suggest ...
William Zhao's user avatar
0 votes
0 answers
20 views

How to do Bayesian MCMC with Compositional Parameter Constraints

So I know that if you have parameter constraints and you were to do a random walk MH without them, you can use a truncated normal distribution as your proposal instead (and of course, this would be ...
LifeisGood94's user avatar
2 votes
1 answer
44 views

Show that the total variation distance of the Metropolis kernel to its proposal kernel is equal to the rejection probability

Furthermore, let $(E,\mathcal E,\lambda)$ be a $\sigma$-finite measure space; $Q$ be a Markov kernel on $(E,\mathcal E)$ with density $q$ with respect to $\lambda$; $\mu$ be a probability measure on $...
0xbadf00d's user avatar
  • 303
1 vote
1 answer
80 views

How does the Metropolis-Hastings algorithm sample from the target distribution when it only uses a proportional distribution? [duplicate]

I've recently started researching the M-H algorithm, and to my understanding, it's used to generates samples from a complex target distribution P(x) by using a proportional distribution f(x). The idea ...
BlackSnowy's user avatar
3 votes
1 answer
60 views

MCMC seems very sensible to the evidence

currently starting to study bayesian ML, and specifically MCMC, in order to compute the posterior: $$ P(\theta|D) = \frac{P(D|\theta)P(\theta)}{P(D)} $$ Now, I see how the acceptance ratio makes sense ...
Alberto's user avatar
  • 1,217
0 votes
0 answers
23 views

Metropolis-Hastings on domain $(2, \infty)$

I'm trying to understand the Metropolis Hastings algorithm in depth by solving some exercise problems. On one of them, I'm asked to use MH to generate samples from $$f(x) = c \frac{1}{\theta}e^{-\frac{...
Christina Kataki's user avatar
2 votes
1 answer
68 views

Reversible-jump MCMC and Poisson processes

Suppose we have a time interval $t \in [0, T]$ in which events occur as a Poisson process with some arbitrary time-dependent rate $\lambda(t)$. These events occur at times $Y=(Y_1, Y_2, \dotso, Y_M)$ ...
Jordan's user avatar
  • 31
1 vote
1 answer
29 views

Name for adaptive simulated annealing that cyclically decreases stepsize, then increases temperature, resetting both after each accepted move?

I have a model with many discrete parameters between 1 and 99. Each step new parameters are sampled from a discrete uniform distribution with variable stepsize around the current parameter value, ...
Livid's user avatar
  • 1,168
0 votes
0 answers
160 views

Setting up a particle filter for a deterministic system with stochastic, time-discrete observations

I have a deterministic process $x(t)>0$ for $0 < t < T$, governed by an ODE for which I want to do parameter inference in a Bayesian sense. The process is hidden but I have $n$ stochastic ...
lmyt's user avatar
  • 21
1 vote
0 answers
54 views

The lower bound of acceptance rate for independent Metropolis–Hastings algorithm

In comparison with rejection sampling, for independent M-H algorithm, if there is a constant C such that$$f(x)=\frac{p(x)}{\int p(x)dx} \leqslant Cg(x)$$ for all x, then the acceptance rate is at ...
向洋杉's user avatar
0 votes
0 answers
119 views

How to compute Expected Squared Jump Distance (ESJD) of a Metropolis-Hastings algorithm

The Expected Squared Jump Distance (ESJD) seems to be defined slightly differently in various papers, which makes this very confusing. For instance, Definition 2.2 of Optimal Scaling of Random-Walk ...
Euler_Salter's user avatar
  • 2,236
0 votes
0 answers
26 views

Metropolis sampling with stochastic estimation of component of probability density

Consider the probability distribution \begin{align} p(x) = \frac{1}{Z} x^2 e^{-x^2 / 2} \end{align} where $x \in \mathbb{R}$ and $Z$ is a normalization factor so that $\int_{-\infty}^{\infty} dx \, p(...
David Albandea's user avatar
3 votes
1 answer
48 views

Derivation of acceptance probability from Linero, Yang (2018)

I am wondering how this paper Bayesian Regression Tree Ensembles that Adapt to Smoothness and Sparsity by Linero & Yang (2018) derived the acceptance probability for $\sigma$. The authors give $\...
xiaoshuxiaowei's user avatar
1 vote
0 answers
49 views

Metropolis Hastings Proposal with Gradient and Hessian Information

I need to sample a high-dimensional parameter vector from a distribution where the gradient, the Hessian and the inverse of the Hessian of the log-likelihood are very cheap to compute. Are there any ...
yrx1702's user avatar
  • 710
0 votes
0 answers
16 views

What is the use of MCMC techniques in this context?

Currently I'm learning about MCMC techniques. . Exercise A researcher wants to sample $\theta$ from a discrete distribution with density function $$ f(\theta)= \begin{cases}p=1 / 6 & \theta=0 |\\ ...
Tim's user avatar
  • 273
3 votes
1 answer
77 views

Using both discrete and continuous moves in Metropolis-Hastings

I want to sample a continuous distribution $f$ using the Metropolis-Hastings algorithm. Can I define my transition kernel as being sometimes discrete and sometimes continuous as long as I use the ...
siliz4's user avatar
  • 33
2 votes
0 answers
22 views

Simulate SDE without error

Let $d,k\in\mathbb N$; $\sigma\in C^1(\mathbb R^d,\mathbb R^{d\times k})$ be Lipschitz and $\Sigma:=\sigma\sigma^\ast$; $(W_t)_{t\ge0}$ be a $k$-dimensional Brownian motion; $\lambda$ denote the ...
0xbadf00d's user avatar
  • 303
1 vote
1 answer
324 views

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

I know that Metropolis-Hastings is an MCMC (Markov Chain Monte Carlo) method that is very useful in higher dimensions. The advantages it has over something like simple rejection sampling are that ...
Aditya S's user avatar
0 votes
0 answers
31 views

Can I use the output of an MCMC algorithm as the input of an independent Metropolis-Hastings algorithm?

Can I and if so, how can I, use the output of a MCMC method as the input for an independent Metropolis-Hastings algorithm? Maybe this question reduces to: How can I get (independent? or at least "...
0xbadf00d's user avatar
  • 303
5 votes
2 answers
245 views

How does Rao-Blackwellization of the Metropolis-Hastings algorithm work?

I've read the paper A vanilla Rao-Blackwellization of Metropolis-Hastings algorithms, but I don't get what their actually suggested estimator is. To give some detail, we are considering the following ...
0xbadf00d's user avatar
  • 303
1 vote
0 answers
162 views

Metropolis Hastings Algorithm and Breaking Reversibility in MCMC

If the goal is to sample from a distribution $\pi$ it is common to build a Markov Chain with stationary distribution $\pi$. Solving this problem using Markov Chain Monte Carlo is essentially ...
σκουλήκι's user avatar
1 vote
0 answers
43 views

Metropolis Hastings Proposal Distribution [closed]

I am trying to sample from a bivariate normal distribution given above. If the proposal distribution is q(theta|theta prime) and theta prime = theta + U, where U is uniformly distributed over [a,b], ...
Deandre Way's user avatar
5 votes
1 answer
201 views

Sampling from the posterior with a constraint on the posterior mean

Background Under certain assumptions we know that being given the posterior mean and a family of conditional distributions, we can uniquely determine the joint distribution. I quote one of the ...
treskov's user avatar
  • 540
6 votes
2 answers
250 views

How to draw from a uniform distribution over a large state space via MCMC

Motivating question I have a high-dimensional state space $\Omega \subseteq \mathbb R^n$ with an admissible subset $S\subseteq \Omega$, which is connected. I would like to draw a uniform random sample ...
Samufi's user avatar
  • 113
1 vote
0 answers
27 views

How should we stratify the space for Metropolis-Hastings?

Say I'm running Metropolis-Hastings with target density $p$. What I would like to do is divide the space $E$, on which $p$ is defined, into a disjoint union $E=\bigcup_iE_i$ and run a separate ...
0xbadf00d's user avatar
  • 303
3 votes
2 answers
291 views

Running Metropolis-Hastings algorithm with changing proposal kernel; each time the kernel is changing starting the algorithm afresh. Does it work?

I have a Markov kernel $Q$ from which I would like to generate proposals for the Metropolis-Hastings algorithm. The problem is: When the proposal is accepted, the "internal state" of $Q$ ...
0xbadf00d's user avatar
  • 303
2 votes
1 answer
104 views

Can we run the Metropolis-Hastings algorithm with a proposal also generated by the Metropolis-Hastings algorithm?

In the Metropolis-Hastings algorithm, depending on the current state $x$, I have a distribution $\rho_x$ and I want to use a sample from $\rho_x$ as the proposal in the next iteration. (I guess ...
0xbadf00d's user avatar
  • 303
1 vote
0 answers
60 views

What motivates a good proposal distribution for a target distribution? (Metropolis - Hasting sampling)

In Metropolis - Hasting sampling, the proposal distribution does not necessarily have to have a form similar to that of the target distribution from which attempts are made to sample from. For one, I ...
Physkid's user avatar
  • 251
0 votes
1 answer
77 views

Metropolis - Hastings sampling: histogram shapes looks sane but bin values are off

The target distribution is of the form: $ p(x) = x^{-6}.e^{\frac{-2.475}{x}}$ with a support in the interval $[0.0, 2.0]$. This gives a plot like Now, to choose a proposal kernel, I think a lognormal ...
Physkid's user avatar
  • 251
0 votes
1 answer
126 views

Computational aspect of the Metropolis-Hastings algorithm

One of the examples online is about how to write the Metropolis-Hastings algorithm from scratch. This tutorial uses a linear regression model as an example. Estimate three parameters: an intercept, a ...
Keith Lau's user avatar
  • 115
1 vote
0 answers
114 views

What is "critical slowing down" using MCMC for a Gibbs-Boltzmann distribution?

When sampling from a probability density function of the form $$p(x)=e^{-\beta E(x)},$$ where $E$ is considered to be the energy of a system and $\beta=1/T$ is the inverse of a temperature parameter $...
0xbadf00d's user avatar
  • 303
1 vote
0 answers
81 views

Test whether a Metropolis-Hastings chain is "sufficiently near" equilibrium using the autocorrelation function

Let $(E,\mathcal E)$ be a measurable space, $(\Omega,\mathcal A,\operatorname P)$ be a probability space, $(X_n)_{n\in\mathbb N_0}$ be an $(E,\mathcal E)$-valued process on $(\Omega,\mathcal A,\...
0xbadf00d's user avatar
  • 303
2 votes
0 answers
217 views

Why is it easy for the Gibbs sampler to take long time to converge to target distribution?

This is related to Gelman's Bayesian Data Analysis 3rd Edition pg 300 first paragraph of Section 12.4. The book says the following. "An inherent inefficiency in the Gibbs sampler and Metropolis ...
user45765's user avatar
  • 1,445
0 votes
0 answers
74 views

Metropolis Hastings Algorithms: How to measure the performance of algorithms? (Multidimensional)

I am working on a project and I am trying to measure the performance and compare two MCMC algorithms. The one is Random-Walk MH and the second one is PCN. I thought of maybe comparing the mean ...
makala's user avatar
  • 11
1 vote
0 answers
197 views

Ordinal regression - 'induced Dirichlet' conditional posterior distribution

I am trying to implement the 'induced Dirichlet' prior model proposed by Michael Betancourt (from section 2.2 of his ordinal regression case study here: https://betanalpha.github.io/assets/...
E_1996's user avatar
  • 11
0 votes
0 answers
75 views

How to use Gibbs sampler to simulate normal-normal hierarchical models?

This is related to Gelman's BDA 3rd Edition Chapter 11, Sec 3. The book says the following. "The Gibbs sampler is the simplest of the Markov chain simulation algorithms, and it is our first ...
user45765's user avatar
  • 1,445
2 votes
3 answers
784 views

How can Metropolis-Hastings use the function it is trying to approximate?

The MH algoithm is used to obtain samples from a probability distribution $f$ that is difficult to sample from directly. The process as described in this answer is: Pick a initial random state $x_0$. ...
xojfqa's user avatar
  • 177
0 votes
0 answers
221 views

Implementing Metropolis-Hasting for multiple variables

Working through a lecture exercise on MCMC methods. I have a dataset containing the outcome of N chess games $-$ in the format Winner, Loser $-$ between M players. When 2 players $p_1$ and $p_2$ play ...
LucDupont's user avatar
1 vote
0 answers
138 views

Is there a variant of the Metropolis-Hastings algorithm with proposal and/or acceptance function depending on the history?

Is there a version of the Metropolis-Hastings algorithm where either the proposal kernel; or the acceptance function might depend on the whole history (or at least a part of it) of the chain so far? ...
0xbadf00d's user avatar
  • 303
0 votes
0 answers
187 views

Necessity of Metropolis Hastings algorithm for given posterior distribution

Let's say that we have calculated the posterior distribution of a parameter of interest given the data of a binomial experiment $N=70,x=34$ which the probability of event occurrence $\theta$ follows ...
Homer Jay Simpson's user avatar
4 votes
1 answer
174 views

MCMC acceptance formula clarification

Metropolis - Hastings : Data Science Concepts youtube shows the acceptance probability $A(a \rightarrow b)$ is $Max(1, \frac {f(b)}{f(a)})$. Is it correct or it should have been $Min(1, \frac {f(b)}{f(...
mon's user avatar
  • 1,548
0 votes
0 answers
31 views

Can we use the Metropolis-Hastings with a discretized proposal?

Consider the Metropolis-Hastings algorithm with proposal density $q(x,y)$ and target density $p(y)$ with respect to some reference measure $\lambda$. If we don't use the proposals $Y\sim q(x,\;\cdot\;)...
0xbadf00d's user avatar
  • 303
2 votes
1 answer
99 views

Is there a variant of the Metropolis-Hastings algorithm where the acceptance probabiltiy can depend on all states generated so far?

I wasn't able to find anything on google, but is there a variant of the Metroplis-Hastings algorithm where the acceptance probability (not the proposal kernel) in the $i$th iteration might depend on ...
0xbadf00d's user avatar
  • 303
1 vote
1 answer
442 views

Time complexity of Metropolis-Hastings and potential speed-up?

The MH algorithm essentially involves generating a sample destination state from a proposal distribution, computing the acceptance probability as a function of that sample, and checking whether a ...
Tanishq Kumar's user avatar

1
2 3 4 5
10