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
2 votes
1 answer
35 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
21 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
  • 690
0 votes
0 answers
14 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
  • 211
3 votes
1 answer
54 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
0 votes
0 answers
17 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
  • 141
1 vote
1 answer
97 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
18 views

Non-reversible MCMC based on diffusion dynamics

Given that the current sample location is $x\in[0,1)^d$, I would like to take the next sample $y$ as $$y=x+b(x)\Delta t+\sigma(x)\sqrt{\Delta t}\xi\;;\;\;\;\xi\sim\mathcal N_{0,\:I_d}\tag1$$ for some ...
0xbadf00d's user avatar
  • 141
0 votes
0 answers
28 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
  • 141
3 votes
2 answers
117 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
  • 141
1 vote
0 answers
98 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
31 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
0 votes
0 answers
14 views

Estimate $\int f\:{\rm d}\lambda$ and $\int g\:{\rm d}\mu$, where whenever $(X,Y)\sim\mu$, then $X\sim\lambda$, by a single Markov chain

Say I want to estimate $$I=\int f\:{\rm d}\lambda+\int g\:{\rm d}\mu.$$ Now, I'm using Metropolis-Hastings to sample from $\lambda$ and from $\mu$, separately. Assume $\mu$ is defined on a product ...
0xbadf00d's user avatar
  • 141
5 votes
1 answer
187 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
  • 522
3 votes
2 answers
189 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
  • 83
1 vote
0 answers
22 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
  • 141
3 votes
2 answers
219 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
  • 141
1 vote
1 answer
77 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
  • 141
1 vote
0 answers
52 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
67 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
102 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
78 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
  • 141
1 vote
0 answers
72 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
  • 141
2 votes
0 answers
144 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,365
0 votes
0 answers
51 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
0 votes
0 answers
23 views

Expression / R code for theconditional posterior PDF for ordinal regression model (for Metropolis-Hastings step within Gibbs sampler)

I am trying to derive an expression for the PDF (conditional posterior density) of the cutpoint parameters of an ordinal regression model so that I can use a Metropolis-Hastings step to sample the ...
E_1996's user avatar
  • 11
1 vote
0 answers
159 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
57 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,365
1 vote
3 answers
598 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
  • 137
0 votes
0 answers
149 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
108 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
  • 141
0 votes
0 answers
17 views

Beginner's example: fitting algorithm to obtain the estimated posterior distributions of the input model parameters using black box models

Some years ago when I was a student I used the DiffeRential Evolution Adaptive Metropolis (DREAM) algorithm (Vrugt 2016) in MATLAB with the goal of fitting experimental data (e.g., the concentration ...
eeric's user avatar
  • 1
0 votes
0 answers
142 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
149 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,374
0 votes
0 answers
27 views

MCMC MH - Intuition of dividing by proposal distribution at acceptance ratio calculation

Understanding Metropolis-Hastings algorithm youtube shows the step dividing the $g(\theta)$, which is propotional to the posterior distribution $P(\theta)$, by the conditional proposal distribution $q(...
mon's user avatar
  • 1,374
0 votes
0 answers
137 views

Metropolis Hastings Algorithm for Student-$t$ distribution

I am self-studying Metropolis-Hastings Algorithm and I am reading the book from C.Robert & G.Casella "Introduction Monte Carlo Methods with R. In page 196 there is the problem 6.10 that asks: ...
Homer Jay Simpson's user avatar
0 votes
0 answers
26 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
  • 141
1 vote
1 answer
89 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
  • 141
0 votes
1 answer
280 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
2 votes
1 answer
103 views

Is there a Quasi-Monte Carlo variant of the Metropolis-Hastings algorithm?

If we run the Metropolis-Hastings algorithm for a target distribution $\mu$ with proposals from a quasi-Monte Carlo sequence $(y_n)_{n\in\mathbb N}$ (such as a Sobol sequence) and the generated chain ...
0xbadf00d's user avatar
  • 141
1 vote
1 answer
56 views

Generate samples by the Metropolis-Hastings algorithm which have a minimum distance between one another

Can we generate samples by the Metropolis-Hastings algorithm with target density $p(x)$ and proposal kernel density $q(x,y)$ such that the samples satisfy a certain constraint? Take the simple example ...
0xbadf00d's user avatar
  • 141
1 vote
2 answers
347 views

Calculating acceptance probability in Metropolis-Hastings algorithm

In the Metropolis-Hastings algorithm, acceptance probability is given as $$ \alpha = \min \left( 1,\frac{f(\theta^{'}|y)q(\theta|\theta^{'})}{f(\theta|y)q(\theta^{'}|\theta)} \right) $$ which ...
cc88's user avatar
  • 13
2 votes
0 answers
92 views

The guidelines for choosing different MCMC algorithms [closed]

MCMC has several types of algorithms: Metropolis-Hastings, Gibbs, Adaptive MH, Hamiltonian Monte Carlo. What are their respective pro/cons, and how to choose them in the Bayesian analysis?
user3269's user avatar
  • 5,112
0 votes
0 answers
65 views

Adaptive metropolis within Gibbs

I once saw some study claims to use the algorithm referred to as "Adaptive Metropolis within Gibbs". Are there any formal introduction on this algorithm? What are the difference between this ...
user3125's user avatar
  • 3,017
3 votes
1 answer
355 views

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

For each iteration of the MH, sample $x'=q(x|x')$, then the acceptance probability is computed:$$A=\min(1,a)$$ where $$ \alpha=\frac{p(x')q(x|x')}{p(x)q(x'|x)} $$ Now, I've seen that the algorithm ...
wd violet's user avatar
  • 605
2 votes
1 answer
87 views

Slice sampling in Particle Gibbs with Ancestral Sampling

Bear with me as I am not from statistical background. My question is about the implementation of PGAS algorithm as given in Lindsten et. al 2014 concerning sampling in state-space models. The two ...
Zero's user avatar
  • 121
0 votes
0 answers
69 views

Metropolis-Hastings or other MCMC method with an unknown asymmetric proposal distribution?

When working with the Metropolis-Hastings algorithm, we can work with an asymmetric proposal density $g(x^\prime | x)$ provided we know the distribution in order to calculate the ratio $\frac{g(x|x^\...
interoception's user avatar
3 votes
1 answer
141 views

parallelizing log-sum-exp

I have some approximate likelihoods: $L_1, \ldots, L_n$. Each is quite expensive to calculate. They're approximate because they use random numbers. Each of them is being calculated on the same data ...
Taylor's user avatar
  • 20.2k
1 vote
1 answer
72 views

Computing the Hastings ratio for multinomial distribution as a proposal distribution in Metropolis-Hastings accept-reject step

I have a question concerning calculating the Hastings ratio in a specific case (multinomial proposal distribution). I consider a discrete vector $M$ with integer values that sum up to some number $N$. ...
Elizabeth_Banks's user avatar
1 vote
0 answers
36 views

Parametrizing and Sampling Multivariate Garch Parameters Metropolis-Hastings MCMC

My question is how to sample multivariate GARCH parameters from a proposal distribution (multivariate normal) for a Metropolis-Hastings algorithm. Considering the different dimensions of the parameter ...
Thomas_R's user avatar
0 votes
1 answer
81 views

Metropolis - Hastings algorithm on a set of countable sequences

I want to simulate $\sigma$ from a measure $\pi(\sigma)$ through the Metropolis-Hastings algorithm, where $\sigma$ is a sequence of 0's and 1's on $S = \{0, 1\}^n$, the set of all sequences of 0's ...
Occhima's user avatar
  • 355

1
2 3 4 5
10