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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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 ...

1
vote
1answer
38 views

How to interpret the importance for a regression coeffcient in Bayesian regression from its posterior density?

I am trying to interpret the regression coefficients of a covariate in a Bayesian linear regression problem. More specifically, I am trying to determine if the regression coefficient have an important ...
0
votes
0answers
31 views

Sanity checking the effective sample size

When running MCMC sampling, a common measure of performance is the effective sample size (ESS). There are lots of different ways to estimate the ESS from samples e.g. https://arxiv.org/abs/1011.0175. ...
5
votes
2answers
328 views

Does multiplying the likelihood by a constant change the Bayesian inference using MCMC?

For numerical Bayesian inference we have Posterior~Prior*Likelihood. In MCMC we do not need to calculate the denominator in Bayes rule. My question is that can I multiply the Likelihood by a large ...
2
votes
1answer
40 views

Interpretation of “scale function” in Foster-Lyapunov drift condition

I'm reading about Markov chains and I'm starting to bump into these drift conditions, and their relationship with a chain's ergodic properties. The drift condition is that there exists a "scale ...
0
votes
1answer
39 views

Metropolis-Hastings in a Bayesian Hierarchical model

I am trying to estimate a Bayesian Hierarchical model using the random-walk Metropolis-Hastings algorithm. While in a non-Hierarchical model, the algorithm is staight-forward, I am not sure I am ...
0
votes
0answers
14 views

How to get Historical prediction value from BSTS model in R

I have a BSTS model and need the forecast for the entire period. For example, My training set is between 2008 to 2016 and my testing is 2017 Jan to 2018 Jan. Now I need the predicted values for 2008 ...
1
vote
1answer
30 views

MCMC samples for constructing a histogram

I am interested in generating samples from a density $\pi(\theta)$ to construct a histogram for $\pi(\theta)$ and to use these samples to generate samples of $f(\theta)$ for some function $f$. I may ...
1
vote
0answers
18 views
2
votes
1answer
27 views

Joint credible regions from MCMC draws

Lets say I have $n$ posterior samples of $\theta_1$ and $\theta_2$. I suppose that any region $R$ which contains exactly $(1-\alpha)n$ of the points will be an approximate $(1-\alpha)\times100$ ...
3
votes
1answer
81 views

In exactly what sense do MCMC draws approximate the target?

Background We want to sample from some intractable density $\pi(\theta)$. Using an MCMC algorithm, we generate a sample of draws $\{\theta_i\}_{i=1}^N$ from a Markov chain that has $\pi(\theta)$ as ...
1
vote
2answers
51 views

What to do once states are rejected in MCMC?

I need to generate samples from a pdf given by $\frac{f_Z(z)\cdot 1_{Z \in B}}{P(Z \in B)}$ where $Z \in \mathbb{R}^d$ is a normal random vector with independent components. $Z \in B$ is a set that is ...
1
vote
1answer
27 views

How does WINBUGS determine the posterior density of a parameter with multiple chains?

I am a new user to WINBUGS. I am running a model with 2 chains. When my model has finished running I have the following posterior density plot of my parameter: The plot only shows one distribution (i....
1
vote
1answer
95 views

MCMC vs Bayesian Optimization Efficiency for MAP estimate

I believe MCMC could be utilized to estimate the MAP. At least there is an option in packages like PyMC. I just started reading about Bayesian Optimization, but the first thing that hit me was that ...
0
votes
0answers
11 views

How to interpret low posterior probability of covariate's positive or negative association?

I am using the following model in WINBUGS to run a hierarchical Bayesian regression where the beta are my covariates: If I modify this model by adding the ...
1
vote
0answers
10 views

Slice Sampling asks to draw from $f^{-1}]y,+\infty[$

Slice Sampling asks to draw uniformly from $f^{-1}]y,+\infty[$. Wikipedia page However, how can we be sure that a uniform defined over the set $f^{-1}]y,+\infty[$ is in fact proper? If I had to ...
1
vote
1answer
24 views

How can the support of proposal distribution impact convergence of RH-MH algorithm?

In the book Introducing Monte Carlo Methods by Casella and Robert, there's a sentence with which I'm having some trouble to understand. «If the domain explored in $q$ [proposal] is too small, ...
2
votes
1answer
46 views

Discrete and continuos parameters in MCMC sampler

I'm working with a 6-dimensional Bayesian model, and the affine-invariant sampler implemented in emcee. Four of those parameters are discrete, while the other two ...
0
votes
0answers
17 views

How to validate Bayesian hierarchical (mixed) model ?

I am new to Bayesian analysis and using the following WINBUGS example to understand Bayesian hierarchical modeling: This is a 'mixed' model with both fixed effects (covariates given by 'beta' terms) ...
1
vote
1answer
30 views

How do interpret a vague prior for hierarchical modeling?

I am new to Bayesian analysis and using the following WINBUGS example to understand Bayesian hierarchical modeling: I have 2 questions: 1) For the fixed effects terms, i.e., the beta0 and beta1 ...
3
votes
1answer
62 views

Would a simple Gibbs, or a Metropolis-Hastings algorithm work for a State-Space model?

I'm wondering if a MCMC algorithm, in a Gibbs or a Metropolis-Hastings style, work for a State-Space model. Would I also be able to learn about the state variable and not just the parameters? I've ...
1
vote
0answers
26 views

HOW TO - Applying MCMC to conditionally select random variables?

I am quite new to the using Graphical Models, so pardon me for the naivety. My intention is to have some fun for the weekend and impress my friends on Monday. I am trying to understand MCMC and ...
1
vote
1answer
46 views

Applying multiESS for multiple (dependent) parallel chains

I'm using the affine-invariant sampler from emcee to draw samples from a $p$ dimensional posterior, using $M$ parallel chains ($M>10$). Since my model is p-dimensional with $p>1$, I'm also ...
0
votes
0answers
16 views

PyMC3 How does one make a model parameter dependent on independent variable?

I recently encounter such an interesting question. For example, if I have want to create a model using x to predict y. A part of ...
1
vote
0answers
23 views

Understanding Adaptive Metropolis MCMC by Haario et al. 2001 [closed]

I'm using the Delayed Rejection Adaptive Metropolis (DRAM) algorithm (Haario et al., 2006) for some Bayesian inference and trying to get an intuition for it so I can be sure to use it properly. So far ...
5
votes
1answer
36 views

How to compare AIC values from two Bayesian posteriors

I have a simple question about model comparison: Let's say you fit two models using MCMC: Model A and model B, where model B is model A minus one parameter. You want to assess whether dropping the ...
1
vote
1answer
30 views

Tolerance and confidence in the minimum multi-variate effective sample size (minESS)

The minimum multi-variate effective sample size (minESS) is defined in the R package mcmcse (where the function is implemented) ...
1
vote
1answer
30 views

Can I use the multivariate effective sample size (mESS) to estimate the autocorrelation time?

Basically, the title of the question. I'm wondering if it is reasonable to use the mESS (defined here) to estimate the autocorrelation time $\tau$ as: $$\tau = \frac{N}{mESS}$$ where $N$ is the size ...
12
votes
4answers
534 views

Are MCMC based methods appropriate when Maximum a-posteriori estimation is available?

I have been noticing that in many practical applications, MCMC-based methods are used to estimate a parameter even though the posterior is analytical (for example because the priors were conjugate). ...
1
vote
0answers
61 views

Bayesian inference of parameter governing Markov transition matrix

A 3-state Markov chain $X = \{x_i : i \in \{1, \cdots, N\}\}$ is observed, and its transition matrix $P$ is assumed to be of the form $$ \begin{pmatrix} (1-a)^2 & 2a(1-a) & a^2 \\ b(1-a) &...
2
votes
0answers
40 views

Bayesian inference of a coin's bias when we don't directly observe the flips

Consider a coin with bias $p$. We generate a random sample $x_1, \dots, x_n \sim \text{Bernoulli}(p)$, but we do not observe results of these coin tosses. Instead, for each $x_i$, we observe a set of ...
1
vote
0answers
13 views

MCMC “best fit” determination for highly correlated/covariant parameters

People often get the "best fit" by finding the median of each dimension. When posteriors are highly non-gaussian, and weirdly covariant, this can fail horribly. For example, here's a schematic ...
2
votes
1answer
59 views

What problem do these trace plots indicate?

The following plots are trace plots of 3 variables for MCMC results of a hierarchical Bayes probit model. The plots are fairly linear and seem to grow (or decline) without bound. This looks like a ...
1
vote
1answer
40 views

why auto correlation exists

I am wondering what is auto correlation? From the definition of Markov Chain, the current state should only depend on previous state, why there exist auto correlation?
2
votes
1answer
119 views

Is there a loss function when estimating a model using MCMC?

I am trying to understand how fitting a model using MCMC works. Is there a loss function that is optimized? Or is it simply a case of more draws from the distribution amount to a more complete ...
3
votes
2answers
97 views

Do we still need to use domain knowledge when doing Bayesian Inference using MCMC?

I am learning MCMC for the purpose of doing Bayesian inference. In Andrieu, 2003, it is mentioned that: ... in order to obtain the best results out of this class of algorithms, it is important that ...
1
vote
0answers
29 views

Competing methods for estimating autocorrelation time

I'm testing several methods for obtaining the integrated autocorrelation time (IAT) of some synthetic data using Python. These methods are: emcee: the built-in method in this MCMC package. ISE: ...
0
votes
0answers
17 views

Phrasing MCMC Results, Quantile of Predictive Quantile

I am conducting an analysis of time for an event to occur. I have observations of times $\{t_i\}_{i=1}^N$ and have found a density $f$ such that $$t_i\sim f(\theta)$$ for parameters $\theta$. Using ...
0
votes
0answers
28 views

MCMC/Bayesian Inference Model Fitting: Parameters over-fitting to a sharply peaked data point. How can I fix this?

I am trying to fit three models to a data set: Method: Each measurement has some measurement uncertainty Generate X samples from a gaussian with mean of the measurement and std of the measurement ...
1
vote
1answer
41 views

Implementation of Metropolis-Hastings with conditional posterior

I'm trying to understand how to estimate the parameter vector $\mathbf{\theta} = (\theta_1,\theta_2, \theta_3)$ of a model using the MH algorithm. I am given a joint posterior density: $p(\mathbf{\...
2
votes
1answer
50 views

Analytical relationship between prior and posterior distributions by Markov Chain Monte Carlo?

I am trying to conceptualize the analytical relationship between the prior distribution and posterior distribution obtained by MCMC for Bayesian inference. Sorry for the non-rigorous notation but I ...
0
votes
0answers
35 views

Scaling a data matrix to execute an algorithm

Suppose that I have to perform a certain algorithm (MCMC) on data that are stored in a matrix. In order to accelerate the convergence, I want to scale the centering them around 0. What type of ...
3
votes
1answer
111 views

Importance weight of conditioned particle in conditional SMC

In a generic particle filter, I understand the importance weights for each particle are calculated as $w_t^s \propto w_{t-1}^s \frac{p(y_t \mid z_t^s) p(z_t^s \mid z_{t-1}^s)}{q(z_t^s \mid z_{t-1}^s, ...
3
votes
1answer
93 views

How to generate a random draw from the joint posterior density after MCMC has converged?

Consider a posterior density that involves two parameters: $\beta_1$ and $\beta_2$ given by $f(\beta)$ where $\beta = [\beta_1, \beta_2]^T$. We run a MCMC sampler to sample from the posterior and ...
1
vote
1answer
52 views

How Specifically do Sampling methods help in training Machine learning models?

I get the gist of sampling methods in probability. These algorithms were developed while building the Atom Bomb to estimate some distribution. The idea was just to try a simulation and note the ...
13
votes
1answer
523 views

Stan $\hat{R}$ versus Gelman-Rubin $\hat{R}$ definition

I was going through the Stan documentation which can be downloaded from here. I was particularly interested in their implementation of the Gelman-Rubin diagnostic. The original paper Gelman & ...
0
votes
0answers
54 views

How to perform a Bayesian estimation of the parameters of a jump-diffusion process using JAGS?

Assume a sample path $\left \{S_t \right\}$ is given for the following jump-diffusion process $\frac{dS}{S} = \mu dt + \sigma dW + Bdq$ (1) where $\mu$ is the drift, $\sigma$ is the ...
3
votes
1answer
30 views

Sampling posterior of empty cluster in GMM and Gibbs

Consider performing inference via a standard Gibbs sampler for a standard Gaussian Mixture Model (GMM) with $k$ components that are Gaussians $$\mathcal{N}(\mu_{k}, \sigma^{2}_{k})$$ where we assume ...
5
votes
1answer
178 views

Probabilistic programming vs “traditional” ML

I was browsing the github repo for Pymc and found this notebook: Variational Inference: Bayesian Neural Networks The author extols the virtues of bayesian/probabilistic programming but then goes on ...
0
votes
0answers
13 views

Possible alteration of an existing pymc3 rugby model using additional data to add a bias towards the winning team

I have been applying [https://docs.pymc.io/notebooks/rugby_analytics.html][1] to my data. The problem is that I also have win/ lose probabilities from another model along with the home and away scores....
1
vote
1answer
81 views

Bayesian Inference for More Than Linear Regression

I learned about MCMC and variational inference for Bayesian inference, and I would like to try it out in some regression problem. However, all existing related models I know falls within either of the ...