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.

Filter by
Sorted by
Tagged with
0
votes
1answer
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 ...
0
votes
0answers
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 ...
3
votes
1answer
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 ...
1
vote
1answer
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 ...
0
votes
1answer
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 ...
0
votes
0answers
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 ...
0
votes
1answer
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|...
0
votes
0answers
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 ...
1
vote
0answers
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 ...
0
votes
1answer
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 ...
3
votes
4answers
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 ...
1
vote
1answer
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. ...
2
votes
1answer
25 views

Rejection sampling: Can the proposal distribution be the prior?

Suppose I have a target distribution $\pi(\theta|x) \propto P(x|\theta)P_{\theta}(\theta)$ (e.g. the unnormalized posterior). I would like to use rejection sampling to obtain many samples $\{\theta_i\}...
0
votes
1answer
25 views

Dynamically adjusting parameters of Markov chain

I am using a Metropolis algorithm to generate samples from a complicated (high-dimensional) probability distribution. As is common, the proposed updates depend on some "step size" parameter $...
1
vote
1answer
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
1
vote
1answer
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 ...
0
votes
0answers
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 ...
0
votes
1answer
17 views

How to do a choice-based conjoint analysis with multiple regression and 3 levels per attribute?

I'm trying to follow these instructions: https://docs.google.com/spreadsheets/d/1Piw0Fk0XCWBJOHhC8NsljvIPywaBmLdNa8QpEV75fHQ/edit#gid=777817907 to do a choice-based conjoint analysis with multiple ...
0
votes
0answers
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 ...
1
vote
0answers
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,$ ...
2
votes
0answers
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 ...
2
votes
0answers
29 views

MCMC not constraining parameters correctly [closed]

I have to fit a model to some data and I was wondering how to interpret the results I get from the Bayesian parameter inference performed using emcee. Model #1 has 3 parameters: $h_0,\Omega_m,\Omega_{\...
0
votes
0answers
20 views

Calculating Monte Carlo Standard Error (MCSE) with Effective Sample size

I want to calculate the Monte Carlo Standard Error of the mean and found this page: https://jrnold.github.io/bayesian_notes/mcmc-diagnostics.html. where naive MCSE is given by: $MCSE(\mu_{naive}) = \...
0
votes
0answers
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 ...
1
vote
1answer
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. ...
2
votes
0answers
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-...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
3
votes
1answer
24 views

SMC Samplers - Optimal Backward Kernel Explanation

In Sequential Monte Carlo Samplers of Del Moral (2006) we see that the optimal backward kernel is $$ L_{n-1}^{\text{opt}} (x_{n-1} \mid x_n) = \frac{\eta_{n-1}(x_{n-1}) K_n(x_n \mid x_{n-1})}{\eta_n(...
0
votes
0answers
17 views

Estimates from MCMCglmm multivariate regression

I'm running a multivariate regression on two response variables (X and Y) using MCMCglmm in R. X is a continuous variable (family = Guassian) while Y is a binary response variable (family = threshold)....
2
votes
1answer
31 views

MCMC with using MAP as starting value

let $X$ be a random variable from my target distribution $\pi(x)$, which I know up to a normalizing constant, and I want to calculate $Ef(X)$ for some know function $f$. The dimensions of $X$ are ...
1
vote
0answers
48 views

What are the bayesian prior distributions to use for a binomial model with unknown $n$ and $p$

I a experimenting with a new MCMC software and before I delve into more complicated models I wanted to run some simple simulations. This is a very very simple simulation, so not meant to be very ...
1
vote
1answer
37 views

Why do we require aperiodicity in MCMC?

According to the Ergodic Theorem by Birkhoff, for any measure-preserving dynamical system $(X, \cal{A},\mu ,\bf{T})$ and any $\mu$-integrable integrable function $f:X \to \mathbb{R}$, the ergodic ...
7
votes
1answer
239 views

MCMC sampling for a model with a multinomial choice--so the parameters need to sum to 1

this is a head-scratcher for me, but a very interesting problem. So I have a stochastic simulation model for a hiring process. Basically different groups get hired into a company with different ...
1
vote
0answers
22 views

Is there any method to use the MCMC method to estimate the measures of samples?

I try to explain my question clearly: The MCMC method generates samples from a candidate distribution in the stationary state. In summary, MCMC generates a sample (i+1) based on sample (i ), $p(s_{i+1}...
3
votes
1answer
65 views

Does the MCMC algorithm use the likelihood function to move to a new proposal value?

I'm trying to understand how MCMC and related algorithms work for Bayesian inference. In this paper the authors use an example of a normal distribution in explaining MCMC. They state, "If the ...
0
votes
0answers
23 views

What is the shape of the distribution MCMC is sampling from in a simple linear regression?

I'm struggling to understand the shape of the space a sampler works with in a Bayesian framework. If I run a simple linear regression I can see that the priors are: a flat prior on the slope a ...
1
vote
1answer
68 views

Did the MCMC model converge?

Would you consider model with these MCMC traceplots and R-hat values as converged, and good enough for publication in a peer-reviewed journal? My peers claim convergence is good; the models ran for ...
1
vote
0answers
27 views

Simulations for uniform limit theorems

When it comes to simulations, I am unfortunately new: How can I verify the performance of my theoretical result, being a limit theorem of the following type: $$\text{sup}_{t\in[0,1]} X_{t}^{n}\overset{...
1
vote
0answers
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 ...
1
vote
1answer
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}$ ...
1
vote
2answers
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 ...
0
votes
0answers
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 \...
2
votes
1answer
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: ...
5
votes
2answers
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 ...
2
votes
0answers
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 (...
1
vote
1answer
54 views

MCMC: sampling or optimization?

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)$...
1
vote
1answer
54 views

When is metropolis Hastings algorithm useful

I need to do a data analysis project and am considering the Metropolis Hastings algorithm to estimate the parameters of a logistic regression model. I would draw from the complete data log likelihood ...

1
2 3 4 5
29