Refers to a Markov Chain Monte Carlo algorithm used to sample from probability distributions.

learn more… | top users | synonyms

1
vote
1answer
109 views

Gibbs Sampling Detecting Change point in time series

I was reading through this one page paper on using Gibbs sampling for detecting a change point in a time series like data. While I understand the part where the $\lambda$ and $\phi$ are chosen from a ...
4
votes
1answer
40 views

MCMC: examples of when direct sampling is difficult (but Metropolis Hastings is easy)

The Metropolis–Hastings algorithm is a Markov chain Monte Carlo (MCMC) method for obtaining a sequence of random samples from a probability distribution for which direct sampling is difficult. Would ...
3
votes
1answer
393 views

Island Hopping with Metropolis Algorithm

From John Kruschke's book, Chapter 7, Pg. 120 (summarised for succinctness): A politician is constantly travelling from island to island on a chain of islands... His goal is to visit all the ...
1
vote
0answers
14 views

Viterbi-like algorithm with a single observation

Consider a Metropolis-Hastings walk over an exponentially large, known state space S. The proposal/transition matrix P is known, as is the target stationary distribution. In fact, assume there is an ...
1
vote
0answers
16 views

Simultaneous multiple perturbations in Markov chain Monte Carlo

I'm coding a McMC algorithm for geophysical applications. Using the Metropolis–Hastings scheme to accept/reject the proposed models is something that I thought I understood completely, but I don't. ...
1
vote
1answer
51 views

burn in for Metropolis Hastings MCMC

I was wondering if there is a principled way to figure out how many samples to discard during the MH-MCMC burn-in stage. So, as I understand it, the initial samples can introduce bias in the ...
1
vote
1answer
40 views

Gibbs sampling versus general MH-MCMC

I have just been doing some reading on Gibbs sampling and Metropolis Hastings algorithm and have a couple of questions. As I understand it, in the case of Gibbs sampling, if we have a large ...
0
votes
0answers
40 views

How to implement a metropolis hastings algorithm to find the posterior pdf of a time-dependent parameter?

Assume that I have a time series observations denoted by Yi where i is from 1-5000. yi=β1 x1i + β2 x2i + β3 x3i + Ci; Here x is the input. I have to find the values of Betas. But, I'm taking all ...
1
vote
1answer
40 views

Simplex Random Walk Mean

Hi I have two questions related to a previous question I asked here: Simplex Random Walk In this link it describes how to perform a random walk on the simplex. ...
2
votes
0answers
18 views

What methodology should I choose? If hiearchical, what model design?

I am working on a problem that has can beyond my level of understanding. I am quite familiar with R, so that would be my preferred choice but I also have access to SAS. Data I have created a fake ...
0
votes
1answer
44 views

Simplex Random Walk

This link describes how to perform a random walk on the simplex using the Metropolis-Hastings algorithm: http://en.wikipedia.org/wiki/User:Skinnerd/Simplex_Point_Picking The description says: "The ...
1
vote
0answers
28 views

Analysis of mcmc output

I have a sequence of Bayesian Networks for del with more epochs. For example if i work with trafic on street I can have a BN for morning, one for afternoon e one for evening. If i collect data for ...
0
votes
1answer
80 views

Metropolis Random Walk Algorithm in Python

I am trying to implement random walk metropolis in Python for generate from a pdf $f$, which is defined in the domain: $$(0, \infty) \times [3, 4] \times (0, \infty)$$ I am using Metropolis Random ...
0
votes
1answer
38 views

Metropolis independence sampler

I need to implement an algorithm of Metropolis Independence Sampler, where the proposal distribution is a Multivariate Normal with 3 parameters. Since my function $f$ is really difficult to ...
0
votes
0answers
25 views

Proper proposal distribution in Metropolis-Hastings for a 2-state discrete process

This question is related to Understanding Metropolis-Hastings with asymmetric proposal distribution. I'm trying to draw sample paths from a 2-state markov chain using M-H. Unfortunately, I've only ...
0
votes
0answers
29 views

MC Standard Error for Metropolis Random-Walk Algorithm

I need to calculate some integrals using MCMC with Metropolis Random-Walk Algorithm. To decide the value I will accept as my integral, I will calculate 5 simulations of MCMC with size 2000, but I ...
0
votes
0answers
26 views

Metropolis Random Walk Algorithm - Covariance Matrix

I need to calculate an integral of a 3 variable density $f(x_1, x_2, x_3)$, defined in a domain $D$, in the region $$T=\{x \in R³|f(x) \geq M \}$$ using MCMC , where $M$ is a given positive constant. ...
1
vote
0answers
36 views

Metropolis Hastings when acceptance rate is not a probability

I need to implement a Metropolis Hastings where the acceptance probability $\alpha$ is not a probability but a logarithm of a score. The logarithm of a score is a negative float. In original ...
1
vote
1answer
38 views

Metropolis random walk using multivariate normal

I need to implement a program that generates a sample from a really complicated distribution $f$ of 3 variables. I need to implement it using Metropolis-Hastings Algorithm's and its variation and I ...
2
votes
0answers
25 views

Metropolis Algorithm for a 3 variated function

I need to implement a program that generate a sample from a 3 variated $pdf$ using the Metropolis algorithm (and its variations). I was thinking to use a 3-variated normal distribution as my proposal ...
3
votes
1answer
91 views

MCMC with Metropolis-Hastings algorithm: Choosing proposal

I need to do a simulation to evaluate an integral of a 3 parameter function, we say $f$, which has a very complicated formula. It is asked to use MCMC method to compute it and implement the ...
0
votes
1answer
42 views

Simple question on acceptance rate in Metropolis Hasting

When we say acceptance rate in a MH algorithm (for examples, suppose it's recommended to have 40% acceptance rate), do we mean overall acceptance rate or we mean acceptance rate after burn in? It's a ...
0
votes
1answer
64 views

pymc random seed doesn't guarantee the same posterior samples?

If pymc.numpy.random.seed(0) guarantee the same random number sequence to initialize a stochastic variable (say a Uniform distribution), why does its posterior samples (from trace plot) don't have the ...
0
votes
0answers
43 views

Choosing an appropriate proposal distribution for metropolis hastings

So far the only constraint I've found for sampling from some target distribution $\pi(x)$ is that the proposal distribution must include the support of $\pi(x)$. That's very vague. What makes a ...
0
votes
0answers
56 views

Proper likelihood function in acceptance probability of Gibbs Sampler

I have a question about the acceptance ratio used when implementing a random walk M-H in a gibbs sampler to generate sample paths of an unobservable process. When computing the likelihood of a set of ...
1
vote
1answer
53 views

Metropolis Ergodicity

I have encountered one last problem with regarding to the Metropolis-Hastings algorithm. I know that ergodicity is needed in the algorithm to imply convergence to a unique stationary distribution. But ...
0
votes
0answers
38 views

Problems with acceptance ratio of MCMC when using a Kalman filter and conjugate-prior for sampling

1. Model I am trying to build a MCMC estimation of the following model (simplified): $\log(P^{-1}(obs_t, \sigma)) = \log(Y_t) + \epsilon_t$ where $\epsilon_t \sim \mathcal{N}(0,\sigma_{e})$. ...
0
votes
0answers
47 views

how to predict Yn value in this formula with Metropolis Hastings or Gibbs?

I have a model with this formula: $$ Y_n=aX_n^b + e_n $$ $$ X_n \in [0,2] \quad\quad a = 1.5 \quad\quad b = 0.5 \quad \quad e_n = N(μ = 0, σ^2 = 1) $$ I want to predict "$Y_n$" value with using ...
1
vote
0answers
65 views

Random walk with bivariate normal distribution

Let $X$ be a random variable from $f(x; \theta)$, where $\theta =(\theta_1,\theta_2)$. I want to: take a sample from this distribution using Metropolis Hastings algorithm and update the parameters ...
3
votes
3answers
128 views

Metropolis algorithm, what is the target distrbution and how to compose it?

When do Metropolis sampling or MCMC, we need a target distribution $P_{target}(\theta)$, and a proposal distribution $P_{proposal}(\theta)$, then a value $\theta_i$ is generated via ...
2
votes
3answers
282 views

Covariance matrix proposal distribution

In a MCMC implementation of hierarchical models, with normal random effects and a Wishart prior for their covariance matrix, Gibbs sampling is typically used. However, if we change the distribution ...
2
votes
0answers
56 views

Metropolis-Hastings to sample from dependent random variables

Imagine the goal is sampling from $p(X,Y)$ and X and Y are dependent real-valued random variables, i.e. $p(X|Y)\neq p(X)$. Now the question is how can we apply Metropolis-Hastings algorithm on the ...
0
votes
1answer
133 views

Bayesian model averaging for variable selection in R

I am trying to use Bayesian model averaging for variable selection with a large number of variables. In R, the BMS package allows to apply the method, with the option of using MCMC sampler (Metropolis ...
0
votes
1answer
46 views

Random walk on simplex as part of Metropolis-Hastings

I would like to perform a random walk on a J-dimensional simplex. However, since this is part of a metropolis-hastings algorithm application, my understanding is that the steps need to be drawn from a ...
1
vote
2answers
388 views

How to sample using MCMC from a posterior distribution in general?

Assume one has the posterior distribution of a parameter, $p(\theta|y)$ and what I mean by having it is that for each point of $\theta$, one can use Monte Carlo method+MCMC to calculate the ...
1
vote
0answers
445 views

Implementing a Metropolis Hastings Algorithm in R

Consider a univariate normal model with mean $µ$ and variance $τ$ . Suppose we use a Beta(2,2) prior for $µ$ (somehow we know µ is between zero and one) and a $log-normal(1,10)$ prior for $τ$ (recall ...
3
votes
1answer
95 views

Perceived circularity in the Metropolis-Hastings algorithm - Where is my error in reasoning?

If I understood it correctly, the Metropolis-Hastings algorithm allows one to sample from a distribution without an analytical representation, which comes in handy, for instance in the Bayesian ...
2
votes
0answers
475 views

Metropolis-Hastings within Gibbs sampling

Suppose we have the following classical normal linear regression model: $$y_i = \beta_1 x_{1i} + \beta_2x_{2i} + \beta_3x_{3i} + e_i$$ where $e_{i} \sim iid.N(0, \sigma^2)$ for all $i = 1, 2, ...
2
votes
2answers
81 views

Determine precision of average estimated with MCMC

I am using a Markov chain Monte Carlo method (Metropolis-Hastings) to estimate the mean of a distribution. What practical methods can be used to efficiently determine the precision of this estimate, ...
4
votes
1answer
164 views

Confusion related to Gibbs sampling

I came across this article where it says that in Gibbs sampling every sample is accepted. I am a bit confused. How come if every sample it accepted it converges to a stationary distribution. In ...
3
votes
1answer
164 views

Prior selection for Gaussian Processes (GP)

I am trying to select a prior for the covariance parameters of my Gaussian Process (GP) and have been running into numerical problems with my MCMC code. My model is the following: $$Y = D\beta + ...
6
votes
2answers
1k views

Confused with MCMC Metropolis-Hastings variations: Random-Walk, Non-Random-Walk, Independent, Metropolis

Over the past few weeks I have been trying to understand MCMC and the Metropolis-Hastings algorithm(s). Every time I think I understand it I realise that I am wrong. Most of the code examples I find ...
3
votes
1answer
2k views

Understanding Metropolis-Hastings with asymmetric proposal distribution

I have been trying to understand the Metropolis-Hastings algorithm in order to write a code for estimating the parameters of a model (i.e. $f(x)=a*x$). According to bibliography the ...
0
votes
1answer
349 views

MCMC autocorrelation convergence diagnostic

I use MCMC (Metropolis-Hastings) to sample posterior distributions of three parameters using a nonlinear least-squares objective function to calculate the likelihood of a parameter sets. I want ...
4
votes
1answer
1k views

Understanding MCMC and the Metropolis-Hastings algorithm

Over the past few days I have been trying to understand how Markov Chain Monte Carlo (MCMC) works. In particular I have been trying to understand and implement the Metropolis-Hastings algorithm. So ...
0
votes
0answers
75 views

Gibbs sampling product of normals as conditional

I am deriving a gibbs sampler for a joint distribution, where the conditionals of various parameters are product of two non-standard normal distributions. Usually, I have seen that in Gibbs sampling ...
0
votes
1answer
663 views

Metropolis-Hastings algorithm, using a proposal distribution other than a Gaussian in Matlab

I am currently working on my final year project for my mathematics degree which is based on giving an overview of the Metropolis-Hastings algorithm and some numerical examples. So far I have got some ...
6
votes
1answer
66 views

Metropolis Sampling and invalid states

I have a short question about Monte Carlo integration with Metropolis sampling. I have a continuous state space, but only certain parts of this state space are valid. It is possible that the ...
1
vote
0answers
92 views

Can I adapt a MCMC proposal using a parallel chain?

I am running two MCMC chains (say chain A and chain B) in parallel, using the Metropolis-Hastings algorithm with acceptance probability: $P(accept\ x_t) = \min\{1, f(x_t)/f(x_{t-1})\}$. I would like ...
1
vote
0answers
59 views

Metropolis sampling of constraint surface

I have a four variable $(x_1, x_2, v_1, v_2)$ state space for a system of ODEs. I would like to build a random sample of the initial conditions for these ODEs --- in other words, I wish to build a ...