Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
13 views

A hierarchical Bayesian model in pymc3

Suppose we have the following model: $X$ unobserved $Y$ such that $Y|X \sim \mathcal{N}(X,\sigma^2)$, observed $Z$ such that $Z|X \sim \mathcal{B}(1,X)$, observed and suppose, given observed data $...
5
votes
1answer
155 views

Likelihood modification in Metropolis Hastings ratio for transformed parameter

I want to use MH to get samples from $p(\theta \mid y) \approx p(y \mid \theta) p(\theta)$. Let's assume $\theta$ is heavily constrained and I transform $\theta$ to $f(\theta)$ so I can sample from ...
5
votes
0answers
57 views

Would an “importance Gibbs” sampling method work?

I suspect this is a fairly unusual and exploratory question, so please bear with me. I am wondering if one could apply the idea of importance sampling to Gibbs sampling. Here's what I mean: in Gibbs ...
0
votes
0answers
10 views

Spatio-tempral Bayesian Poisson model convergence investigation

I am fitting a spatio-temporal Bayesian Poisson model with 22 explanatory variables, an offset variable, 2200 observations and non-informative priors. I am using the package ...
0
votes
0answers
25 views

Effective Sample Size for Weighted Samples

I have an MCMC sampler with weighted samples and I want to compute effective sample size at every step to determine sample degeneracy. I am using the following formula: $ESS = \frac{(\sum_{i=1}^N{w_i}...
0
votes
0answers
9 views

forward sampling for Bayesian network with continuous variables and equation-based causal relationships

I have a physical system which can be represented by the following Bayesian network. It has the following characteristics 1) The encoded variables are continuous variables 2) The causal ...
4
votes
0answers
53 views

Logistic Regression and Omitted Variable Bias

I just want to confirm that I am understanding this correctly. So if logistic regression models have omitted variable bias, does that mean that I should discard any logistic regression models that ...
6
votes
1answer
83 views

Can double dipping be reasonable?

I found a paper where the authors used bayesian methods to estimate asymmetric effects in impulse response functions. In short the estimation procedure is: Calculate a VAR and Impulse responses (no ...
5
votes
1answer
37 views

Can MCMC algorithm estimate partition function (normalizing constant)?

Importance Sampling can estimated the normalizing constant by averaging the weights (the ratio of unnoramlized distribution and importance distribution). Is there anyway that MCMC algorithm can ...
0
votes
0answers
67 views

Gibbs sampler for ARIMA AR(1) parameters: division by zero

Suppose the following AR(1) model: $$ y_t = \mu + \phi (y_{t-1} - \mu) + \epsilon_t $$ with $\epsilon_t \sim \mathcal{N}(0,\sigma^2)$. Following issue arises when sampling from $P(\mu_i \;|\; \phi_{...
17
votes
3answers
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 ...
2
votes
0answers
39 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 ...
2
votes
1answer
32 views

Gibbs sampling allocations for time dependent observations from this model

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}|...
1
vote
0answers
21 views

sampling mechanism for correlated variables [closed]

Assuming Y=f(x1,..,Xn), while doing Monte Carlo simulation, I need to sample x1, ..xn based ...
0
votes
0answers
15 views

Should the autocorrelation time drop after many steps or converge to a fixed value?

I'm using Bayesian MCMC to explore a 6 parameters model (the parameters are quite correlated). In one of these runs, I noticed that the estimate of the mean (across chains and parameters) ...
1
vote
2answers
55 views

NUTS Drawing samples from slice sampler; how to keep bounds on log scale?

I'm currently working to adapt the No U-Turn Sampler from this paper for a model I'm working on. The No-U Turn sampler augments the typical hamiltonian system by incorporating a slice variable $u$ ...
2
votes
1answer
36 views

slice sampling correctness

Theoretically, the slice sampling has equilibrium distribution as the target distribution. If we can sample exactly as follows, $y' = U(0, p^*(x))$ $x' = U\{x: p^*(x) > y' \}$ However, in the ...
1
vote
0answers
15 views

How to find posterior of global parameter over many datasets? Is my method valid?

Let us say I have 100 objects, and for each one I have a dataset with 50 data points. Each object's dataset can be modelled with 2 free parameters, let's say P1 and P2. On top of this, there's a ...
1
vote
0answers
46 views

Recommended point estimate for non-normal distribution?

I have a rather non-normal marginalized posterior for some parameters, resulting from a Bayesian MCMC. Example: I know that the actual distribution is what truly represents the parameter, but I need ...
1
vote
1answer
58 views

Why is variational Bayesian mixture model an alternative to MCMC? What are the similarities?

Why do people say that a variational Bayesian mixture model could be an alternative to MCMC for clustering? For example see the details here: https://en.wikipedia.org/wiki/Variational_Bayesian_method. ...
1
vote
0answers
54 views

Can MCMC to be too computationally inefficient if you have too many random interactions?

Suppose I have a regression where the response variable is sales, and I have various drivers of sales as the independent variables. I want to build a model using MCMC but I am unsure if it is even ...
0
votes
0answers
29 views

Calculating Repeatability by MCMCglmm

I'm trying to calculate repeatability of aggression (ordinal scores ranging from 1 to 6) of individuals. Individuals (ID) are not independent, but are nested within colonies. We know that colonies ...
1
vote
0answers
18 views

Convergence in total distribution distance in the Random Walk Metropolis-Hastings algorithm

I'm searching for a proof of the convergence in total distribution distance of the transition probabilities of a Markov chain generated by the Random Walk Metropolis-Hastings algorithm to its ...
0
votes
1answer
45 views

Generating very few samples from a probability distribution using MCMC?

Since MCMC converges to target only after taking very large number of steps, what if I want to have just say 10 samples from target distribution? Do I still have to generate lots of samples, and then ...
1
vote
1answer
69 views

Conditional distribution in this Gaussian Mixture Model

Say I observe $N$ observations $\{x_1, \dots, x_N\}$ from a $k$ component Gaussian Mixture model, with $k > 0$ known and is such that each $x_i|\boldsymbol{\pi}, \boldsymbol{\mu} \sim \sum_{j=1}^{k}...
0
votes
0answers
14 views

Testing equality of estimates in MCMC GLMM

I am estimating a Poisson mixed model using MCMC via the MCMCglmm package in R. My dependent variable is repeated measures of event counts in each of several ...
2
votes
0answers
45 views

Selecting the number of replicas / temperatures in parallel tempering MCMC

There are a few strategies for selecting the values of the temperatures (or betas, where $\beta=1/T$) in a parallel tempering MCMC (geometric, adaptive, aimed at a 0.234 temperature swap acceptance ...
6
votes
1answer
103 views

Optimal scaling of the Random Walk Metroplis-Hastings algorithm and the speed measure of the limiting diffusion

Let $d\in\mathbb N$ with $d>1$ $\ell>0$ $\sigma_d^2:=\frac{\ell^2}{d-1}$ $f\in C^2(\mathbb R)$ be positive with $$\int f(x)\:{\rm d}x=1$$ and $g:=\ln f$ $Q_d$ be a Markov kernel on $(\mathbb R^...
2
votes
2answers
245 views

Bayesian inverse modeling with non-identifiable parameters?

If I have a physical model \begin{equation} y = \frac{1}{\beta_0} (\beta_1 x_1 + \beta_2 x_2) \end{equation} and want to estimate coefficients $\beta_0$, $\beta_1$, and $\beta_2$ from given data ...
1
vote
0answers
22 views

MCMC - Diagnostics plots

I am currently using MCMC for Bayesian Inference and am now plotting diagnostics plots. While I understand what I am looking for in a trace plot, I am not so sure about the cumulative quantile plot ...
1
vote
0answers
19 views

Assumptions on the target density in the RWM optimal scaling paper by Roberts, Gelman and Gilks

In the famous paper Weak Convergence and Optimal Scaling of Random Walk Metropolis Algorithms by Roberts, Gelman and Gilks, at the bottom of page 116, the supremum of the third derivative of $\ln f$ ...
1
vote
0answers
89 views

Clarification: Are Generative Adversarial Networks an alternative to MCMC sampling?

I have been reading the original Goodfellow, et. al. paper on Generative Adversarial Networks and the way that they can obtain estimates of the posterior distribution of a discriminative network or ...
1
vote
2answers
40 views

How does one usually compute the gradient and the Hessian of a proposal in a MCMC algorithm?

In some proposals of a MCMC, the mean/location vector and the covariance/scale matrix are functions of the gradient/jacobian and hessian of the log-likelihood. I'm wondering how does one usually find ...
0
votes
0answers
19 views

Hamiltonian MCMC information gathering [duplicate]

I started gathering information about Hamiltonian MCMC and I would like to ask if someone knows some good papers or books.If it possible notes that give a detailed explanation of Hamiltonian MCMC. ...
0
votes
1answer
41 views

Proposal in MCMC lives in bigger space than parameter space. Which transformations should I choose?

I'm using a MCMC algorithm. The proposal is, due to lack of information on my part, a multivariate T-Student distribution, i.e. $\theta \sim \mathcal{MT}(\mu, \Sigma)$. However, some of the components ...
2
votes
1answer
34 views

Calculating Integral Using MCMC

Consider the integral $\int_{\Theta}f(\theta|\mathbf{x}) \Pi(\theta)d\theta$,where $\theta$ is a univariate parameter and $\Theta$ is the support of $\Pi(\theta)$. I need to evaluate the value of this ...
2
votes
0answers
29 views

Is the MC produced by HMC reversible?

I know that the deterministic dynamics in Hamiltonian Monte Carlo/Hybrid Monte Carlo are reversible and the numerical integrators one uses to approximate them are reversible too. But HMC consists of 2 ...
11
votes
2answers
353 views

Is Gibbs sampling an MCMC method?

As far as I understand it, it is (at least, that is how Wikipedia defines it). But I've found this statement by Efron* (emphasis added): Markov chain Monte Carlo (MCMC) is the great success story ...
2
votes
1answer
44 views

Is RJMCMC robust to overfitting?

I have noticed that RJMCMC is often described as robust to overfitting. I am struggeling a bit with the intuition for this. Why doesn't the Reversible jump Markov Chain Monte Carlo (RJMCMC) always ...
0
votes
1answer
146 views

How to create a distribution and sample?

Suppose we are given some small set of data on bundles of electrical wires and increasing voltages run through them, and we note how many of the individual wires fail. So for example, a large data ...
-1
votes
1answer
29 views

2 versions of Metropolis-Hastings : are they equivalent?

I have seen 2 different versions of Metropolis algorithm. First one : Second one : I don't understand the differences between the 2 versions, especially in the second one where I have to use the ...
0
votes
1answer
59 views

Metropolis Hastings - Acceptance ratio, proposal and lkelihood

From a previous post : First to explain the MH algorithm, it's used to approximate numerically a target distribution, in this case $p(\theta|D)$. At each stage of the algorithm: A value ...
3
votes
0answers
62 views

Posterior mean estimator with MCMC (Metropolis Hastings Algorithm) - Concrete example

I have a little project for which I have to estimate parameters on a PSF (Point Spread Function = response of the system to a dirac, i.e a star in my case). I have the 6 parameters to estimate : $p=(\...
3
votes
2answers
121 views

Optimizing $\chi^2$ using MCMC

I have measurements of an object. Let's say I have its length $L$, mass $M$, and age $t$: $$\mathbf y = (10~\text{m},\ 0.01~\text{g},\ 5~\text{s}).$$ I also have the uncertainties on my measurements ...
1
vote
0answers
14 views

How to perform a phylogenetically informed regression on individuals rather than species?

Let's imagine a scenario in which I have 100 individuals from five different species of the same genus. Their phylogenetic relationship is known (a tree is available). I want to look at the overall ...
2
votes
1answer
36 views

Finding the Poisson rate parameter with PyMC3

I'm trying to compute the rate parameter of fake set of poisson data, where I set the parameter. When I run PyMC the posterior distribution always peaks around the true rate parameter, but never ...
5
votes
2answers
210 views

The meaning of Bayesian update

I'm new in Bayesian inference and I can't found the answer to this: In real life scenario people use MCMC to compute the posterior distribution given the likelihood and the prior. Analytical ...
3
votes
1answer
67 views

Bayesian MCMC methods that need to calculate the evidence / normalizing factor

I came across this answer which states that: NOT all the MCMC methods avoid the need for the normalising constant. I was under the impression that one of the strengths of the MCMC methods (usually ...
2
votes
1answer
34 views

Calculating DIC from MCMC (gibbs) output

I just want to make sure my understanding of how we estimate DIC using MCMC output is correct, as the wikipedia page is somewhat confusing. Defining DIC by $$DIC = p_D + \bar{D}$$ with $$D(\theta) ...
2
votes
0answers
25 views

Adaptive selection of Mass values in Hamiltonian Monte-Carlo?

I know there are good solutions for adaptive selection of path lengths and step-size for Hamiltonian Monte-Carlo (e.g. the NUTS sampler), but for the sampler to work efficiently we also require that ...