# mcmc's questions - Chinese 1answer

952 mcmc questions.

### 1 How to reduce autocorrelation in MCMC

I'm using MCMC to simulation the distribution of some parameters in a Bayesian hierarchical model, which has the following form: $$\gamma_{ik} \sim Ber(\omega_{ik}).$$ Then I make a logit-...

### -1 Poor sampling/mixing in simple model with varying intercept brms

0 answers, 21 views bayesian mixed-model mcmc stan hmc
I'm trying to fit this simple varying intercept model with brms: Weight ~ Height + (1|Gender) However sampling is slow (>10mins), effective sample size is low, autocorrelation is large. Although the ...

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

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

1 answers, 28 views r regression bayesian mcmc winbugs
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....

### 8 Modelling a mixed model in JAGS/BUGS

2 answers, 950 views mixed-model mcmc jags
I am currently in the process of implementing a model for soccer result prediction in JAGS. Actually, I have implemented several, but I have reached my most difficult challenge yet: A model described ...

### 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 Does multiplying the likelihood by a constant change the Bayesian inference using MCMC?

2 answers, 331 views bayesian 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 ...

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

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

1 answers, 41 views interpretation mcmc markov-process
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 ...

### 2 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$ ...

### 1 MCMC vs Bayesian Optimization Efficiency for MAP estimate

1 answers, 95 views mcmc bayesian-optimization
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 ...

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

### How to get Historical prediction value from BSTS model in R

0 answers, 14 views time-series bayesian mcmc bsts
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 In rjags simulation, fix the proportion of binomial variable

0 answers, 18 views binomial mcmc proportion jags coda
...

### 3 In exactly what sense do MCMC draws approximate the target?

1 answers, 82 views mcmc monte-carlo approximation
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 What to do once states are rejected in MCMC?

2 answers, 51 views sampling mcmc metropolis-hastings
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 One-Step ahead predictive likelihood for time series forecasting

I am still new to Bayesian forecasting, so I am hoping to get some clarification on a simple concept (by the sounds of it). Suppose that we are interested in forecasting some time series one-step ...

### 1 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, ...

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

### 221 How would you explain Markov Chain Monte Carlo (MCMC) to a layperson?

11 answers, 148.166 views bayesian mcmc intuition teaching
Maybe the concept, why it's used, and an example.

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

0 answers, 10 views mcmc gibbs slice-sampler
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 ...

### 4 Tuning MALA (Metropolis-adjusted Langevin) proposal

I'd like to implement a version of Metropolis-adjusted Langevin sampling, but I'm unsure how to go about tuning the parameters of the proposal density. My understanding is that in MALA, a proposal ...

### 2 Discrete and continuos parameters in MCMC sampler

1 answers, 47 views bayesian mcmc
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 ...

### 3 Stochastic volatility: particle filter vs Metropolis-Hastings

In many of the papers on particle filter I've read (e.g. Douc, Moulines and Olsson, 2007), stochastic volatility is a common example to show that a newly-proposed filter is working. At the same time, ...

### 7 How to get multivariate credible interval estimate(s) / highest density regions (HDR) after MCMC

I'm estimating 15 parameters of my model using a Bayesian approach and a Markov Chain Monte Carlo (MCMC) method. My data after running a MCMC chain of 100000 samples is therefore a 100000×15 table of ...

### 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 Applying multiESS for multiple (dependent) parallel chains

1 answers, 46 views bayesian sample-size mcmc posterior
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 ...

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

### 2 MCMC acceptance rate decreases when proposal variance gets smaller

1 answers, 94 views mcmc metropolis-hastings
I am drawing a sample Y of size n from a p-dimensional Normal ($\mu, \Sigma$). Typically, p is 5. I have $\bar{Y}$ and $V = YY'$, the sum of squares. Now I want to draw samples from this $\bar{Y}$, ...

### 13 Predictions from BSTS model (in R) are failing completely

2 answers, 6.661 views r time-series bayesian mcmc bsts
After reading this blog post about Bayesian structural time series models, I wanted to look at implementing this in the context of a problem I'd previously used ARIMA for. I have some data with some ...

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

1 answers, 63 views bayesian mcmc state-space-models
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 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 ...

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

0 answers, 16 views normal-distribution mcmc pymc
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 ...

### 14 MCMC Geweke diagnostic

2 answers, 2.839 views mcmc diagnostic
I'm running a Metropolis sampler (C++) and want to use the previous samples to estimate the convergence rate. One easy to implement diagnostic I found is the Geweke diagnostic, which computes the ...

### 5 How to compare AIC values from two Bayesian posteriors

1 answers, 36 views mcmc aic posterior jags
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 Understanding Adaptive Metropolis MCMC by Haario et al. 2001 [closed]

0 answers, 23 views bayesian mcmc metropolis-hastings
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 ...

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

### 9 (interacting) MCMC for multimodal posterior

4 answers, 2.045 views sampling mcmc inference convergence
I am trying to sample from a posterior having many modes particularly far from each others using MCMC. It appears that in most cases, only one of these modes contains the 95% hpd I am looking for. I ...

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