Questions tagged [mcmc]

Markov Chain Monte Carlo (MCMC) refers to a class of methods for generating samples from a 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 first MCMC method was the Metropolis algorithm, later modified to the Metropolis-Hastings algorithm.

1,047 questions
21 views

sampling from normal distribution using MCMC doesn't seem correct [on hold]

I'm trying to sample from the normal distribution with a mean of .5 (like flipping a coin) and an arbitrary standard deviation using a markov chain (sequence of numbers where each number is dependent ...
17 views

Setting an upper limit on an estimate

I have used MCMC to estimate the value of a parameter $\theta$ from some data. I have thousands of samples from the (marginal) posterior distribution. The distribution of $\theta$ is roughly Normally ...
26 views

MCMC sampling with a probability density function that have potential negative values

My question might be quite strange, but I will expose you the complete issue in order for you to help me. I am in the context of a parallel randomized clinical trial which aim is to compare two ...
20 views

Is it right to vary $\sigma$ in a single MCMC chain at different times?

I am doing an MCMC analysis of Planck CMB data (https://en.wikipedia.org/wiki/Cosmic_microwave_background) for a particular Physical model of the universe. In the analysis I am trying to estimate a ...
21 views

Does specifying normalizing constant significantly improves Hamiltonian Monte Carlo?

From my understanding the energy function needs only be specified such that it is proportional to the log density, and not specifying the normalizing constant should not greatly impact the sampling ...
18 views

MCMC chains and Convergence

This may be a dumb question to ask, but I was doing MCMC sampling of my parameters $\alpha_1, \ \alpha_2 .... \alpha_{50}$, where $\alpha_i$ denotes for the same parameter $\alpha$ at the time i. I ...
34 views

Convergence check in MCMC chains in R

I use Gelman-Rubin statistics, trace plots, autocorrelation plots and effective sample size to check the convergence. However, I got very different results from the above tests. The Gelman-Rubin ...
16 views

In RJags and MCMC in general, if I do not care about convergence, can I always set n.chains to be 1?

My understanding of RJags and implementing an MCMC model there is that the parameter n.chains will run however many chains you specify, but these chains are ...
549 views

Maximum likelihood parameters deviate from posterior distributions

I have a likelihood function $\mathcal{L}(d | \theta)$ for the probability of my data $d$ given some model parameters $\theta \in \mathbf{R}^N$, which I would like to estimate. Assuming flat priors on ...
11 views

MCMC After collecting the accepted samples, what to do with them next?

I'm a bit confused with the MCMC sampling. It is used to approximate an unknown posterior distribution. Suppose 1000 proposed samples are accepted. How to use these samples next? How to approximate ...
45 views

An efficient way to generate multivariate normal distribution by Gibbs sampler? [closed]

When learning Gibbs sampler, the most used example is bivariate normal. But what if we want to simulate multivariate normal distribution? The computation (mean and variance) of conditional ...
29 views

Ignoring the normalising constant in Bayesian MCMC

This post relates to my original question here, but this time focusing on a more fundamental misunderstanding of how MCMC actually works. When using Bayesian MCMC for parameter inference with a ...
19 views

How to compute a combined likelihood involving multiple datasets?

I have a parametric model that generates $N$ time series, and my goal is to try to find a model where the $N$ predicted time series match $N$ observed time series relatively well. My physics-based ...
30 views

Question about validity of an MCMC algorithm

Let suppose I want to sample from the posterior distribution of $X_1,X_2|y$ using an MCMC algorithm and let indicate with $X_i^t$ the value of $X_j$ at the $t-$th iterations. I want to know if the ...
31 views

Combining “unbalanced” likelihoods in a “process-based” model

I have a "process-based" water quality model, which is essentially a black-box full of differential equations describing various chemical and hydrological processes. The model is deterministic and ...
27 views

Is there an HMC algorithm that estimates a model with noncontinuous parameters?

Is there an HMC algorithm that estimates a model with noncontinuous parameters? All of the intuition I have for how HMC surfs around in the phase space is based on examples for posterior distributions ...
15 views

Which gradient to compute in a hierarchical model for M-H MCMC?

We have the following model: $$y_t=Mx_t+\epsilon_t$$ with $M$ being a matrix such that $M\sim F_{\lambda}$(assume it's a conjugate prior). The $\lambda$ does not appear in $M$, only in its ...
164 views

Naive Monte Carlo, MCMC and their use in Bayesian Theory

So let's suppose I have a random variable X which follows a PDF fX(x) which is known. I can use the Naive Monte Carlo method (...
43 views

What does the distribution of samples from an MCMC method converge to without repeated samples?

Suppose I have an absolutely continuous distribution with density $f(x)$ and I use an mcmc sampler which has accept/reject step to sample from this distribution. In the final samples, there are some ...
43 views

Why volume preservation is important for Metropolis update? [duplicate]

I think my question is naive but I would like to ask why why volume preservation is important for MCMC and specifically Metropolis update.I'm reading the following paper https://arxiv.org/pdf/1206....
48 views

Estimate the asymptotic efficiency of a Markov chain sampling by the method of batching

In the paper Efficient Metropolis Jumping Rules, the author is writing that he used "the method of batching" for the estimation of $\operatorname{eff}_{\overline\theta_i}$ in Table 1 (on page 605). ...
192 views

60 views

36 views

How to perform MCMC integration when no prior over the integrated function is available? [closed]

As far as I can tell, MCMC integration (e.g. VEGAS) is performed by sampling from a distribution proportional to $f(x)$ using MCMC, then building a density estimator $g(x)$ using these samples (for ...
21 views

Metropolis-Hastings Algorithm for Bayesian Hierarchical model

I have developed a Metropolis-Hastings Algorithm for a double sigmoidal model, but now the aim is to create a Bayesian Hierarchical model that depends on incoming temperature data. For example, the ...
58 views

Gibbs sampler for a multilevel model with no predictors in R

I'm working on multilevel models and want to know how they are estimated in R. For that purpose I'm reading amongst other things "Data Analysis Using Regression and Multilevel/Hierarchical Models" by ...
15 views

2k views

Are MCMC without memory?

I'm trying to understand what Markov chain Monte Carlo (MCMC) are from the French Wikipedia page. They say "that the Markov chain Monte Carlo methods consist of generating a vector $x_ {i}$ only from ...
48 views

Bayesian estimation of traffic flow - Help with methodology

I need help setting up a model for estimation of traffic flow. I shall do the analysis with a Bayesian approach. Data: I have sensor data from ten sensors. The sensors are installed at three main ...
I observe $N$ observations $\{x_{1,t_1}, \dots, x_{N,t_N}\}$ from a $k$ component Gaussian Mixture model. The $i$th observation is seen at time stamp $t_i$ and is distributed such that each \$x_{i,t_i}|...