Questions tagged [markov-chain-montecarlo]

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.

Filter by
Sorted by
Tagged with
1
vote
0answers
16 views

Mean acceptance rate for Metropolis-Hastings algorithm

My question relates to the result stated on page 4 of: http://stat.columbia.edu/~gelman/research/published/baystat5.pdf which claims that the mean acceptance probability when performing the Metropolis-...
1
vote
0answers
18 views

What is the “empirical distribution” in the context of Bayesian inference?

A colleague of mine was using the functions bayesglm() and sim() from the arm-package in <...
3
votes
1answer
87 views
+50

Inference in Dirichlet process mixtures via collapsed Gibbs sampling

I need to cluster some data $\{x1, \ldots, x_n\}$ through a Dirichlet process mixture model. Consider the following Dirichlet process mixture model, in which the base measure is a $NIW(\mu_0, \...
0
votes
0answers
35 views

Markov model for patients on a transplant waitlist?

I am developing a Markov model in Treeage based upon survival data for individuals on a transplant waitlist (running first order monte carlo). Over the time horizon, individuals may either become ...
0
votes
0answers
14 views

Is Inverse Variance Weighting biased if my samples come from correlated data?

I have a brief question about whether or not inverse-variance weighting is a biased or unbiased estimator when the samples themselves are means of correlated data themselves. To elaborate on this, let'...
1
vote
0answers
72 views
+50

Best way to combine MCMC inference with multiple imputation?

I can derive an MCMC algorithm for sampling from the posterior distribution of a parameter vector of interest, but only starting with a dataset that has no missing values. The actual dataset that I ...
-1
votes
1answer
34 views

Metropolis Hastings with Gamma Proposal Density

I am trying to use Metropolis Hastings to sample from a shifted gamma distribution. Since it is shifted, it has a domain of $(n, \infty)$. I tried using a Gaussian proposal density and ran into the ...
0
votes
1answer
50 views

MCMC Gamma Distribution

I am applyig a MCMC simulation with a Gamma distribution. I am trying to simulate the rainfall in a city using data collected during 1000 days. First step is to simulate the "data colleceted ...
0
votes
0answers
10 views

Is it a good idea to use the mean and standard deviation of coefficients from other models as my prior in Bayesian Regression?

I have a dataset that I’ve been playing around with for school I have gotten very good results with a bunch of methods (Ridge, Lasso, ElasticNet, SVM, Bagging, Stacking and NN even) Now I’m having a ...
0
votes
0answers
19 views

Converting posteriors to likelihoods by removing prior

I have a set of MCMC chains (i.e., unnormalized posteriors) for a parameter I modeled for a sample of objects. I have a model that requires that I condition on the likelihoods of this parameter. My ...
0
votes
1answer
26 views

What does “having excellent Likelihoods” mean ? (MCMC code) [closed]

I asked an astrophysicist about MontePython code (MCMC code). He told me that its team had excellent Likelihoods about a cosmological survey. What does "having excellent Likelihoods" mean ? ...
0
votes
0answers
12 views

How to ensure that chains in an ensemble MCMC sampler are “well-mixed”?

I am using an ensemble MCMC sampler in which I run many (e.g. >20) chains simultaneously to sample the posterior distribtuion for Bayesian inference. I find that some (or most) of the chains end up ...
0
votes
0answers
12 views

Local independence vs global independence in markov network

I am having a hard time understanding the basic differences between the local independence and global independence of a markov network. Please help me illustrate with a graph or any example
0
votes
0answers
191 views

MCMC sampler on simplex: choosing a proposal distribution

I'm fitting a model using Bayesian MCMC. The model parameters include a parameter vector $\beta$ which is assumed to reside on a simplex $$S^d=\left\{ \beta=(\beta_1,\beta_2,\cdots,\beta_d);\space \...
1
vote
0answers
13 views

JAGS Cannot insert node into P[1:3,1:100]. Dimension mismatch [closed]

I am new to JAGS and trying to replicate results from a textbook I have been reading. When I run my code I am persistently getting the error Error in jags.model(model.file, data = data, inits = init....
0
votes
1answer
34 views

MCMC: Rejecting samples outside the prior support?

I wish to implement a MCMC procedure for a posterior density which has non-trivial prior support. To clarify, this means that the parameter space has certain regions (i.e., combinations of parameters) ...
0
votes
0answers
4 views

To obtain the BPM should the BMA model be worked out?

In section 8.4 of this book: An Introduction to Bayesian Thinking, I learned the Bayesian Model Averaging(BMA) model and the Best Predictive Model(BPM). The Bayesian Model Averaging Model is obtained ...
0
votes
0answers
16 views

Modeling a collection of timeseries with censored data

UPDATED for clarity (originally I used the words "missing" and "censored" data interchangeably, whereas only "censored" is accurate in this case). I am modeling a ...
0
votes
1answer
24 views

Estimation with MCMC [closed]

I would like to ask some high-view questions about MCMC. I do not have a specific example, I just want to get a general intuitive idea. Suppose I have a data set $X$ and a rather complex model with ...
0
votes
0answers
18 views

How to efficiently calculate the statistical autocorrelation time of a Markov Chain?

I've been calculating integrals using MCMC and, in the analysis of such integrals, this requires me to calculate the autocorrelation time of a given Markov Chain in order to calculate the correct ...
0
votes
1answer
45 views

Eliminating divergent transitions in Stan

I have the following dataset - ...
1
vote
1answer
42 views

Random Walk Metropolis: acceptance probability with truncated normal proposal

I want to draw from my target density $p(\theta)$ using Random Walk Metropolis. $\theta$ has domain $[2, +\infty)$, and I am using as proposal a truncated normal, namely: $$q(\theta_t') \sim N(\theta_{...
2
votes
1answer
103 views

Monte Carlo Methods: [closed]

Can someone explain to me the following statement from “Introducing Monte Carlo methods with R!” By Robert Christian. “If the exploration mechanism has enough energy to reach as far as the boundaries ...
2
votes
1answer
137 views

Gibbs sampling with Poisson Gamma models

I am trying to obtain a Gibbs sampler for a Poisson-Gamma topic model. Essentially, for each document $d$, the likelihood of $d$ depends on a Poisson parameter $\lambda_d = \sum_k \pi_{k,d}\phi_{k,w}$....
0
votes
1answer
30 views

Computing the acceptance rate (empirically) of samples from the Metropolis algorithm, where samples are “thinned”

I have a number of queries about computing the acceptance rate of samples generated from the Metropolis (symmetric random walk) algorithm empirically, that is, in the presence of burning-in and ...
1
vote
1answer
69 views

Metropolis Hastings for Poisson Distribution

Studying Bayesian Inference and Markov chain Monte Carlo (MCMC) algorithms, I am facing a self study question on a MCMC approach to a Poisson distribution with parameter $\lambda$. Using R, my code is:...
1
vote
0answers
25 views

How can I tune my Random Walk Metropolis Hastings algorithm on the fly?

I just have a very general question. I've recently started to use Random Walk Metropolis-Hastings (RWMH) to sample from a distribution in order to calculate integrals. But I've noticed that the ...
0
votes
0answers
19 views

Thinning and burn-in in Metropolis-Hastings algorithm

I have written a Metropolis-Hastings algorithm manually in Julia language for a customized distribution, and i want now to know how can i perform the thinning and the burn-in to increase the ...
0
votes
0answers
24 views

MCMC beginner question at an example chain plot: Do I need more steps? How much burn-in do I need, if I can tell already?

I am using the emcee python library to fit a model to data via MCMC. Below an example plot for the chain of one of my parameters. Here I ran 1000 steps with 100 walkers. Now I have two beginner ...
1
vote
1answer
14 views

how to overcome error while defining multiple loops for model specification in OpenBUGS?

I'm using following program for MCMC simulation. While compiling this code, I am getting error message which is multiple definition of node s[1]. I am not able to ...
0
votes
0answers
9 views

Independence of MCMC samples when drawing from a deck of cards

In Texas Hold'em Poker (THM), it is common to use MCMC sampling to estimate the probability that a player will win a hand, if not all board cards are dealt yet. To make this question self contained I'...
0
votes
0answers
21 views

Estimation and interpretation of the posterior distribution difference of two independent posterior distributions

I'm currently working with bayesian item response models and found the possibility using the odds ratio values of itempairs to check if they are conditionally independent assuming the data generation ...
0
votes
1answer
27 views

Re-sampling with replacement a longitudinal dataset in R

I have a large dataset from a study I conducted in which I'm attempting, for pedagogical reasons, to use for a class. However, due to IRB constraints, I cannot use the real data. Instead, I would like ...
1
vote
1answer
36 views

Why iterations of Gibbs sampling for a bivariate Gaussian distribution can be seen as random walk?

In Section 4.4 of the excellent technical report Probabilistic Inference using Markov Chain Monte Carlo Methods, the author tries to analyze the performance of Gibbs and Metropolis algorithm with ...
3
votes
1answer
67 views

Risk (Strategy Game) winning probabilities and expected troops lost

Recently, I was introduced to the European version of Risk, the strategy game, which is almost the same as the USA version, but with a slight variation in the attacking method. First of all, the ...
0
votes
0answers
24 views

Slice sampler algorithm for regression models

Slice sampling seems to be the go to sampler in JAGS ans WinBugs but I have been unable to find a reference algorithm on how this would be implemented; most books that I have seen have shown ...
0
votes
1answer
25 views

How do we define the kernel to calculate the acceptance ratio for Metropolis-Hastings Markov Chain Monte Carlo?

I am having a lot of difficulty understanding how to apply the algorithm to a real scenario. The part that confuses me is that we are looking for a target distribution (the real distribution of our ...
2
votes
0answers
59 views

Hamiltonian Monte Carlo (or Langevin Monte Carlo) on a Sphere

I want to perform Hamiltonian Monte Carlo (HMC) or Langevin Monte Carlo (LMC) on a spherical domain $\mathbb{S}^{D-1}$ embedded in a Euclidean space $\mathbb{R}^D$. My energy function is a deep neural ...
2
votes
1answer
37 views

How many chains should i run in winBUGS?

i am relatively new to winBUGS and i am running a meta-regression model for bayesian meta-analysis. This model tracks the posterior distributions of the parameters mean and tau-square. Moreover,which ...
2
votes
1answer
31 views

Finite Binomial mixture model

I have a finite Binomial mixture model coded up in stan as below: ...
1
vote
0answers
35 views

ABC Pseudo Marginal

Suppose, that we have observed data denoted as $y_{obs}$, a likelihood function $l(y|\theta)$ where the parameter $\theta$ follows a prior distribution $\pi(\theta)$. The posterior in the usual ...
1
vote
1answer
113 views

Algebra for logistic regression slice sampler

I am having some difficulties when trying to do a little bit of algebra from Example 7.11 from the book "Introducing Monte Carlo Methods with R: Robert & Casella" The example relates to ...
2
votes
0answers
22 views

Show that posterior distribution is proportional to likelihood times prior when both y and X are in the equation

Reviewing MCMC for my work, I have got a problem with the very fundamental equation for the posterior: $$ P(\theta |y, X) = \frac{P(y|X, \theta)P(\theta)}{p(y|X)} = \frac{P(y|X, \theta)P(\theta)}{Z} $...
0
votes
1answer
24 views

Predict values from complex Rjags model

It's the first time I'm working with R2Jags, MCM chains and Bayesian models and I'm having trouble to compute the predicted values for my model. The model is based on research by Hallmann et al. 2017, ...
0
votes
0answers
16 views

Metropolis-Adjusted Langevin Monte Carlo on a Bounded Domain [duplicate]

I am trying to apply Langevin Monte Carlo (LMC) to generate samples in a bounded domain, for example, $[0, 1]^D$. How should I properly treat boundaries to ensure valid sampling? I have tried clipping,...
1
vote
0answers
50 views

what is the optimal step size for metropolis-hastings algorithm to have independent state

In the PRML chapter 11, The Metropolis-Hasting algorithm, For a sampler with Gaussian distribution as proposal distribution. The original distribution is correlated multivariate Gaussian distribution, ...
1
vote
0answers
24 views

High-dimensional integrals with computationally tractable closed-form solutions

What are some high-dimensional integrals with multimodal integrand and correlated variables, that also have computationally tractable closed-form solutions? The goal of the above constraints is to ...
0
votes
0answers
36 views

Selecting Priors for the Function sdPrior() to include in a Bayesian Time Series Analysis with MCMC using the BSTS Package with a Poisson Response

Overview I am conducting a Bayesian time series analysis using the bsts package that incorporates mcmc simulations with a Poisson response for counts of birds. The predictors are (see data frame ...
0
votes
0answers
14 views

Fitting delay distribution to time series data using MCMC

My objective is to estimate the parameters for a delay distribution linking two time series. Suppose X(t) and Y(t) are two sets of daily counts, where the same individuals are counted in both time ...

1
2 3 4 5
27