# Questions tagged [markov-chain-montecarlo]

Markov Chain Monte Carlo (MCMC) refers to a class of simulation methods for generating samples from a complex target distribution by generating random numbers from a Markov Chain whose stationary distribution is the target distribution. MCMC methods are typically used when more direct methods for random number generation (e.g. inversion method) are infeasible. The very first MCMC method was the Metropolis (et al.) algorithm, later expanded by Hastings.

1,402 questions
Filter by
Sorted by
Tagged with
13 views

### Regarding Gibbs sampling and HMC in fitting Bayesian model, their differences and advantages

I have a question regarding the two MCMC algorithms, Gibbs sampling and Hamiltonian Monte Carlo (HMC) for performing the Bayesian analysis. If using Gibbs sampling, my understanding is that we need to ...
21 views

### Bayesian multivariate regression with common coefficients

In a hierarchical model I'm working on, I have $K$ different $N\times P$ predictor matrices, each denoted $X_k$ and $K$ length $N$ outcome vectors each denoted $y_k$. Essentially, I have a ...
67 views

### Bayesian Estimation: MCMC vs MAP

I'm still relatively new to understanding the bayesian mentality. MCMC (e.g metropolis hasting) finds out the posterior distribution of the parameters of interest. MCMC requires taking many samples ...
22 views

### Rationale behind ignoring the "denomintator" in Bayes Rule [duplicate]

In the context of MCMC sampling, we often say that the posterior distribution is only proportional to the numerator of Bayes Law. We tend to say that the "denominator" (i.e. the normalizing ...
14 views

### JAGS error in the estimation of a simple INAR model

I am having a hard time try to figure out how to translate a simple INAR(1) model in JAGS. \begin{equation} Y_t = \alpha \circ Y_{t-1} + e_t \end{equation} where $\circ$ is the binomial thinning ...
18 views

### Bayesian regression for the sum of Gaussians

I'm pretty new to Bayesian statistics and I want to use Bayesian regression on a 2D data set (frequency on x-axis and measurement data on the y-axis) to quantify the uncertainties. The model is a ...
29 views

### Details of the Metropolis-Hastings Algorithm [closed]

Clarifying the Metropolis-Hastings Algorithm: 1) Metropolis-Hastings: In Bayes Law : P(thetha|data = [P(data|thetha) * P(thetha)] / P(Data) In the continuous case: P(Data) = integral of [ P(Data|...
35 views

### Understanding difference between Maximum Likelihood and Levenberg Marquardt result

In some of my regression results I noticed a deviation between Maximum Likelihood (via Monte Carlo Markov Chain, initialised by parameter result of Nelder-Mead, median value pictured) result and ...
21 views

### How to fit a scalable Bayesian VAR model in Stan/JAGS

I am trying to fit a Bayesian vector auto regressive model but I am struggling with the computation. I tried both JAGS and Stan to fit the model but I have never being able to fit it successfully. It ...
47 views

### Differenciate between two distributions using gibbs sampling [closed]

This question is relate to the post : " Conditional distribution for Gibbs sampling for Gaussian mixture " but is a little bit different. My objective is to know why the algorithm (which is ...
166 views

### Inverse Predictive Posterior

Suppose I have a parametric nonlinear model, say $$y_i |\theta \sim N(f_{\theta}(x_i), \sigma^2)$$ with known form of $f_\theta$. We get data $d=(y_i,x_i)_{i=1,\ldots,n}$ and obtain posterior ...
28 views

### Approximating the posterior and learning the distribution over the weights after training

I am familiar with the methods in variational inference in which after training we have access to the distribution over the network's weights. This is necessary for estimating epistemic uncertainty. ...
25 views

17 views

### How to calculate errors of best value of parameters that obtained from MCMC method and observational data

I had a model and some observational data. I used MCMC method to obtain the best value of free parameters and used some coding to plot contours of 1 to 3 sigma confidence levels (as you see in the ...
19 views

### How to use maximum likelihood method if you don't know the ydata error of each data point?

I'm trying to fitting a model to a set of data (xdata, ydata) with a maximum likelihood method or maybe MCMC if needed. When I followed the tutorials on emcee website, I notice that you have to know ...
12 views

### MALA vs NUTS for sampling in MCMC fashion

Could someone please point out the pros and cons of Metropolis-adjusted Langevin algorithm and No-U-Turn Sampling algorithm wrt sampling from an intractable posterior? Which is better? Please try to ...
55 views

### How to understand the scaling in Metropolis Hastings MCMC

We know the Metropolis Hastings (MH) in MCMC: target distribution: $\pi(x)$ proposal distribution: $p(y|x)$ acceptance: $\alpha(x,y) = \min \Big(1, \dfrac{\pi(y)p(y|x)}{\pi(x)p(x|y)}\Big)$ Here are ...
19 views

### Measure to capture within-chain fluctuations in MCMC?

I am using two kinds of updates for a particular parameter in MCMC estimation of my model. First update gives the following trace plot: Second update gives the following trace plot: Note that the ...
17 views

11 views

### Is it possible to estimate parameters from data with MCMC using squared error, with no probability model of the observed data?

I am familiar with using MCMC with a likelihood to estimate model parameters. However, I have recently been in a new field which usually gets point estimates of parameters using least squares rather ...
19 views

### Proving simulation with rejection generates conditional distribution

I'm working with Poisson processes, but the idea is more general. I want to simulate a two-dimensional Poisson process (over the unit square so we can ignore an area factor) with parameter $\lambda,$ ...
25 views

### How to apply MCMC to bayes when likelihood is not easy to compute

Let $z$ be observations and $w$ be the parameter that we want to infer. Assuming that we know the prior $p(x)$, by using Bayes law, we have $p(x|z) = p(z|x)p(x)/p(z)$ where $Z$ is the marginal ...
29 views

16 views

### What filter should I use for non gaussian distribution?

I have a process that measureing distance between 10-100mm and I currently measuring at 11-18mm with a fixed distance. I want to improve this measurement by adding a filter. Here is the distribution ...
66 views

### What is the interpretation of this modified Metropolis algorithm?

Modified Metropolis-Hastings Consider a model with parameters $\theta = (\alpha, \gamma)$ and consider a modified Metropolis-Hastings algorithm which can be summarized (with brevity) as follows. ...
64 views

### MCMC fitting of a Dirichlet Process or Polya Tree prior to the residuals in a (simple linear regression)/(2-independent-samples) problem

Consider a simple location-shift semi-parametric model with two mutually-independent samples (here $F$ is a cumulative distribution function (CDF) on $\mathbb{ R }$, the $C_i$ and $T_j$ are real-...
22 views

### Using Multiple MCMC Chains in Higher Dimensions For Convergence Diagnostics

I have an MCMC problem where I sample from mixture of two multinormal distributions with dimension D. I use Random-Walk Metropolis-Hastings algorithm to sample from that mixture. For the mixture of ...
18 views

### Probabilistic Bethe Lattice Growth: Bayesian or Markov?

Is the growth of a probabilistic Bethe lattice considered a Markov process or a Bayesian network? Consider a Bethe lattice where the coordination number, z, where z is probabilistic and has maximum ...
24 views

27 views

### Distance Measures between Prior and Posterior

Suppose that I want to measure the distance between a discrete posterior distribution $p(x|Data)$ and each discrete prior distribution $p(x)$. When I have full analytical knowledge of both the ...
47 views

### Detailed Balance: What is the continuous analogy of the transition matrix?

I am having trouble understanding the definition of detailed balance in the case of a continuous state space. The definition of detailed balance that I am working from is: A pmf $\pi$ on $\mathcal{X}$ ...
90 views

### Good convergence diagnostic; bad trace plot

I am fitting a multi-level state-space model and am running into a situation where the Gelman-Rubin diagnostic shows acceptable convergence (R-hat < 1.01), but when I look at the trace plots of the ...
47 views

### Metropolis Algorithm for a high dimensional Bimodal distribution

I am using metropolis mcmc for an $n=8$ dimensional system on an (n-1)-sphere. I was considering the 2d case, as it can be visualized. For this case, the probability density,up to a normalization, is \...
367 views

### Gibbs Sampler for Normal and Inverse Gamma Distribution in R

I'm trying to implement a Gibbs sampler for the following conditional distributions using R: This is the code I have in R so far: ...
328 views

### Metropolis Hastings algorithm bivariate normals

I need some help implementing the (1) independence Gaussian proposal and (2) random walk Gaussian proposal to simulate from a mixture bivariate normal distribution. "If we have a continuous state ...
31 views

### MCMC algorithm overestimating the mode

I am looking for an MCMC algorithm that leaves a target $\pi$ invariant but that overestimates the mode. Basically I am looking for an algorithm that whose transition kernel leaves $\pi$ stationary (...
I need a conceptual clarification on Markov Chain Monte Carlo (MCMC). I have read that MCMC is used to sample from a posterior distribution when the shape of the likelihood distribution $p(x | \theta)$...