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
0
votes
0answers
22 views

How to sample from a joint probability distribution of two variables? [duplicate]

I want to randomly sample from a joint probability distribution characterized by two variables x and y. So, basically, I have the information of the joint PDF which has the dimension 100x50. As per my ...
1
vote
0answers
24 views

Mean acceptance rate for Metropolis-Hastings algorithm

My question relates to the result stated on page 4 of: http://stat.columbia.edu/~gelman/research/published/baystat5.pdf which claims that the mean acceptance probability when performing the Metropolis-...
-1
votes
1answer
39 views

Metropolis Hastings with Gamma Proposal Density

I am trying to use Metropolis Hastings to sample from a shifted gamma distribution. Since it is shifted, it has a domain of $(n, \infty)$. I tried using a Gaussian proposal density and ran into the ...
1
vote
1answer
44 views

Random Walk Metropolis: acceptance probability with truncated normal proposal

I want to draw from my target density $p(\theta)$ using Random Walk Metropolis. $\theta$ has domain $[2, +\infty)$, and I am using as proposal a truncated normal, namely: $$q(\theta_t') \sim N(\theta_{...
2
votes
1answer
103 views

Monte Carlo Methods: [closed]

Can someone explain to me the following statement from “Introducing Monte Carlo methods with R!” By Robert Christian. “If the exploration mechanism has enough energy to reach as far as the boundaries ...
0
votes
1answer
31 views

Computing the acceptance rate (empirically) of samples from the Metropolis algorithm, where samples are “thinned”

I have a number of queries about computing the acceptance rate of samples generated from the Metropolis (symmetric random walk) algorithm empirically, that is, in the presence of burning-in and ...
0
votes
0answers
19 views

Thinning and burn-in in Metropolis-Hastings algorithm

I have written a Metropolis-Hastings algorithm manually in Julia language for a customized distribution, and i want now to know how can i perform the thinning and the burn-in to increase the ...
0
votes
1answer
25 views

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

I am having a lot of difficulty understanding how to apply the algorithm to a real scenario. The part that confuses me is that we are looking for a target distribution (the real distribution of our ...
0
votes
1answer
52 views

Metropolis-Hastings with non-centered Proposal

I am trying to draw samples from the Laplace distribution $\pi^* = \text{exp}(-|\theta|)$, using Metropolis Hastings algorithm with a noncentered proposal, meaning that regular Metropolis wont work.. ...
1
vote
0answers
51 views

what is the optimal step size for metropolis-hastings algorithm to have independent state

In the PRML chapter 11, The Metropolis-Hasting algorithm, For a sampler with Gaussian distribution as proposal distribution. The original distribution is correlated multivariate Gaussian distribution, ...
0
votes
0answers
10 views

How to sample posterior distribution for models with random effects?

I have a time series model contains some fixed parameters ($\beta_{1}$, k, m, etc. ) and also a random effect (i.e. $\beta_{t}$ follows a random walk, with starting value $\beta_{1}$ and variance ...
1
vote
0answers
27 views

Metropolis-Hastings algorithm for a completely specified distribution

Consider a random variable $X\sim f(x)$, such that $$ f(x)=\frac{1}{c}\times K(x)\propto K(x), $$ where c: normalizing constant, K(x): the kernel of the distribution (ie the part which involves $x$). $...
1
vote
1answer
69 views

Application of Metropolis Hastings

I am trying to implement the Metropolis Hastings algorithm for Bayesian analysis. In this case, the parameter of interest is the scale parameter for a Weibull distribution. The context is for ...
0
votes
3answers
46 views

Real-life example in which Markov chain Monte Carlo is desirable? [duplicate]

A typical introduction to the Metropolis--Hastings algorithm, and hence to Markov chain Monte Carlo techniques in general, starts with the following assumptions on some probability distribution $P(x)$ ...
0
votes
0answers
16 views

Metropolis Hastings for BART: Calculation of Tree Prior and Transition Kernel

I am trying to understand the details of BART (Bayesian Additive Regression Trees). In particular, I would like to know how the Metropolis Hastings acceptance probability is calculated for BART. My ...
2
votes
0answers
26 views

Gibbs updating algorithm (Gibbs steps) for computationally expensive likelihood

I am looking for a good way to update steps in a Gibbs sampler where the likelihood function is computationally expensive. Here is what I tried so far: By default JAGS uses a slice sampler. However, ...
0
votes
0answers
17 views

Bias in unbiased pseudo-marginal estimation

In the Pseudo-marginal Metropolis-Hastings algorithm exact sampling of a posterior distribution is performed when using an unbiased estimate of the marginal likelihood. However, I am having problems ...
0
votes
0answers
10 views

Updating only a subset during Metropolis updates: Is this method ergodic

I am currently implementing a multivariate random walk Metropolis sampler (Metropolis within Gibbs). One problem I have is that computing the likelihood is computationally expensive. Thus, I am ...
0
votes
0answers
39 views

Metropolis Hastings Stuck in Local maxima

I've been running the metropolis hastings algorithm to infer some parameters. After running multiple chains, there are typically two places the chains get stuck in, one of which has a higher ...
0
votes
1answer
120 views

Metropolis Hastings algorithm for joint posterior of probability of heads for 2 coins

I am trying to implement a simple metropolis hastings algorithm to simulate the joint posterior of the probability of flipping heads for 2 coins, $\theta_1,\theta_2$. I am following the problem ...
-1
votes
1answer
33 views

Discrete Proposal distribution MCMC

If you want to perform MCMC (Metropolis-Hastings) to infer discrete values, what are some proposal distributions you can use for this. I can't think of a way to extend the notion of a gaussian ...
0
votes
0answers
69 views

Metropolis-Hastings Discrete Proposal Distribution

I have a Metropolis-Hastings scheme implemented, where I am currently inferring a number of parameters using Gaussian proposal distributions. However, I would now like to assume I don't know the ...
1
vote
1answer
42 views

Computing the hastings ratio, g(x|x')/g(x'|x) for asymmetric proposal distributions in MH algorithm?

I understand the Metropolis algorithm. Where I get confused is the MH algorithm where asymmetric proposal distributions may be used. I understand that P(x) and P(x') represent the likelihood/...
0
votes
0answers
12 views

Uncorrelated Samples from a non-conjugate (but well behaved) posterior

I'm trying to create a Dirichlet process mixture model with a kernel distribution similar to a product of gammas. (in fact, if I generate a latent random variable, it IS a product of (independent) ...
2
votes
1answer
220 views

Metropolis -> Metropolis-Hastings for asymmetric proposal distributions?

The below python code implements the Metropolis algorithm and samples from a single variable gaussian distribution. The initial value is sampled uniformly within 5 standard deviations of the mean. ...
0
votes
0answers
74 views

Jacobian term for Metropolis Hastings algorithm?

Suppose an acceptance ratio of the MH sampler without parameter transformation is like this: \begin{gather} r=\frac{f( \theta ',\gamma '|y,m) q( \theta ',\gamma '|\theta ,\gamma )}{f( \theta ,\gamma |...
2
votes
1answer
45 views

Approximation in hierarchical model

Consider a simple Bayesian hierarchical model: $y | \theta \sim P(y | \theta)$ $\theta | \phi \sim P(\theta | \phi)$ $\phi \sim P(\phi)$ I'm interested in drawing from the posterior distribution of $\...
1
vote
0answers
62 views

How should I implement an adaptive Metropolis algorithm for a Gibbs sampler with two Metropolis steps?

Consider the Gibbs sampler Sample $\theta' \sim p(\theta|\tau, D)$ Sample $\tau' \sim p(\tau|\theta', D)$ Both conditional distributions are sampled with a Metropolis step. The joint distribution is ...
1
vote
1answer
210 views

Metropolis-Hastings exercise with Cauchy and normal distributions [self-study]

I have the following exercise to solve and would appreciate some help. Consider a linear regression model $y = X\beta + \varepsilon$, where $y = (y_1,...,y_T)'$, $X = (x_1,...,x_T)$, $x_t$ is a single ...
4
votes
0answers
38 views

Escape unsuccessful accept-reject step in MCMC

I have an MCMC procedure that samples latent variables $h_1, \dots, h_T$. It is based on Shephard and Pitt (1997), https://doi.org/10.1093/biomet/84.3.653. Let $f$ be the true conditional posterior ...
3
votes
1answer
183 views

Metropolis-Hastings: target distribution with two modes; deterministic transformation

I'm trying to construct a Metropolis-Hastings algorithm to sample a target distribution $p(x)$ with two different and isolated modes. The example I'm working with is \begin{equation} p(x) = \frac{\...
5
votes
2answers
153 views

Optimization as sampling for stochastic functions

Given an input space $X$ and a function $f: X\rightarrow \mathbb R$, we want to find $x^*=argmin_{x\in X} f(x)$. One way is to cast this problem as a sampling, where we define a distribution $p(x)\...
2
votes
1answer
64 views

Quickest Way For Me To Learn About Metropolis Hastings

First of all, thanks for reading. I have a month to learn about Metropolis-Hastings with mathematical rigour, and i don't have other responsibilities. I am using second edition of "Monte Carlo ...
0
votes
1answer
35 views

Metropolis-Hastings undersampling near kink in distribution function

I'm trying to use Metropolis-Hastings to sample from a distribution that's very close to $$\exp(-|x|/\ell)$$ and I'm finding that the method is undersampling near the origin, where there's a kink in ...
4
votes
1answer
116 views

Finding the target distribution for the Metropolis algorithm

Let's consider the Markov chain $X_n$ defined on $\mathbf{X} = \{0,1,2...,n \}$, generated according to Metropolis algorithm. Let $X_0 := 0$ be a starting state. The accepting rule is as follows: if $...
4
votes
2answers
879 views

What is the intuition behind the Metropolis-Hastings Algorithm? [duplicate]

I've been studying Bayesian Statistics lately, and just came across the Metropolis-Hastings Algorithm. I understand that the goal is to sample from an intractable posterior - but I'm not really able ...
-1
votes
1answer
56 views

What do we commonly call a Sampler ? and the link between MonteCarlo, Metropolis-Hasting method, MCMC method and Fisher formalism

Sorry to ask multiples questions but they are all related to the same problematic. I would like to get explanations/clarifications as much as possible since I am going to use all these methods in the ...
3
votes
1answer
219 views

Metropolis Hastings for Posterior of Bivariate Normal

As an exercise, I am trying to implement metropolis hastings to draw samples from the posterior distribution of a bivariate normal: $$ (X,Y) \sim N \left( (0,0)\begin{bmatrix}1 & \rho \\ \rho &...
0
votes
0answers
11 views

What is the differnce between simulation and estimation in bayesian statistics? [duplicate]

Can someone help me understand the difference between simulation and estimation of different Bayesian statistical methods like MCMC or metropolis-hasting etc.
3
votes
1answer
79 views

MCMC - one chain behaving differently

I'm using an adaptive MCMC (metropolis-hastings) scheme to infer some parameters. I've run 7 chains, each starting from a random point. 6 of the chains vaguely converge to the same area, but one of ...
0
votes
1answer
37 views

Can I do HMC with the wrong Hamiltonian?

I am a novice HMC user. I am reading Neal's chapter in the Handbook of MCMC. I think I can present the HMC algorithm as : Sample a new momentum Propose a new momentum and a new position using a ...
1
vote
0answers
27 views

Why does Metropolis-Hastings build a simulated density function from the visit counts and not the target values?

From Kruschke's Doing Bayesian Data Analysis, he states that with Metropolis-Hastings, "each position will be visited proportionally to its target value". By 'target value' he means the calculation of ...
2
votes
0answers
22 views

How the Markov Chain Monte Carlo chains can be trusted through diagnostic plots

I am given several diagnostic plots of parameter values from a generated MCMC chains. . It is asking me that Do the diagnostic plots suggest that the MCMC chains can be trusted? My attempt: I tried ...
2
votes
1answer
33 views

How to generalize shrinkage to fully-bayesian models?

I've got a time series that I'm modelling as an exponential; growth rate, with the rate following a logistic distribution: $$ y_t = e^{x_t r_t} $$ where $$ r_t = \frac{L}{1-e^{-k(x_t-x_0)}} $$ I've ...
2
votes
0answers
79 views

Asymptotic variance of Metropolis-Hastings estimates on a disjoint subdivision of the state space

I'm running the Metropolis-Hastings algorithm on a state space $(E,\mathcal E)$ which can be disjointly subdivided into regions $E_1,\ldots,E_k$, $k\in\mathbb N$ ($k\approx1e5$). On $E$, I have a ...
2
votes
1answer
207 views

What should be the burn in period for Metropolis-within-Gibbs?

I need to get samples from an unnormalized distribution $p(\theta, \tau | D)$. However, sampling directly from the joint distribution with Metropolis-Hastings is hard, as the sampler rarely finds ...
1
vote
2answers
65 views

Simulated annealing acceptance probability puzzle

My understanding of simulated annealing (SA) is that at any iteration $t$, a new sample $Y_t$ is generated, which, if the objective function $E$ is improved, i.e., $E(Y_t)<E(X_{t-1})$, then $Y_t$ ...
1
vote
0answers
15 views

Are there methods or considerations for real-time Gelman-Rubin diagnosis while running multiple mcmc chains in parallel?

I have a Metropolis-Hastings algorithm in Python and I parallelized it with the multiprocessing library. However, at this moment I can only do Gelman-Rubin diagnosis when all generated parallel chains ...
0
votes
0answers
72 views

I'm searching for a sampling kernel capturing the idea of a small local perturbation (like the normal distribution does)

Let $d\in\mathbb N$. I'm searching for a Markov kernel $\kappa$ on $\left([0,1)^d,{\mathcal B([0,1))}^{\otimes d}\right)$ suitable for the following application: Given $x\in[0,1)^d$, I want to sample ...
0
votes
1answer
57 views

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

I've seen that different authors define the acceptance probability $\alpha$ of the Metropolis-Hastings algorithm with target distribution density $p$ and proposal kernel density $q$ differently; some ...

1
2 3 4 5
8