Markov Chain Monte Carlo 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 less computationally expensive methods for random ...

learn more… | top users | synonyms

0
votes
0answers
7 views

Using multi-processing for MCMC code

I am a newbie pymc user and the MCMC code that I have written is slow and I would like to modify my code in order to speed it up. Is it possible to use multi-processing to speed up the performance of ...
2
votes
0answers
21 views

Defining constraint on prior with potential class

I have written an MCMC code in order to estimate parameters Xpos, Ypos, MASS and concentration with a set of input data gal_pos, ...
4
votes
1answer
24 views

MCMC: examples of when direct sampling is difficult (but Metropolis Hastings is easy)

The Metropolis–Hastings algorithm is a Markov chain Monte Carlo (MCMC) method for obtaining a sequence of random samples from a probability distribution for which direct sampling is difficult. Would ...
2
votes
0answers
46 views

Mixture of probits: understanding truncated-based likelihoods

I am trying to implement a mixture model of probits to infer the best decision boundary for every latent subpopulation. When doing Gibbs sampling, we eventually have to compute $P(y^* | w_c)$ where ...
0
votes
0answers
29 views

MCMC for Bayesian Inference (Gibbs Sampling) Varying Observed Data

At every step $k$, a Markov chain Monte Carlo algorithm for Bayesian inference with Gibbs sampling draws a parameter of the model to fit, $\beta_i^{(k)}$, from the conditional ...
3
votes
0answers
44 views

Stochastic Programming (e.g. LP) with MCMC

I have just started learning about MCMC (using PyMC), and it seems to be a hammer that can be used to solve a large class of inference and optimization problems. While I understand that there are ...
4
votes
1answer
32 views

Geweke diagnostic of a Markov chain: why does the first window have to cover the burn-in?

I read the following statement in this document$^{[1]}$, at the bottom of page 11: Too wide A will some times “hide” the burn in part within the converged part of the chain and the difference in ...
0
votes
1answer
36 views

MCMC model from CDF values?

I am looking for a working example of an MCMC Bayesian model (for JAGS, etc.) when random variates, from a given distribution with unknown parameters, are observed only via their CDF values. For ...
1
vote
1answer
48 views

burn in for Metropolis Hastings MCMC

I was wondering if there is a principled way to figure out how many samples to discard during the MH-MCMC burn-in stage. So, as I understand it, the initial samples can introduce bias in the ...
1
vote
1answer
35 views

Gibbs sampling versus general MH-MCMC

I have just been doing some reading on Gibbs sampling and Metropolis Hastings algorithm and have a couple of questions. As I understand it, in the case of Gibbs sampling, if we have a large ...
0
votes
0answers
31 views

How to implement a metropolis hastings algorithm to find the posterior pdf of a time-dependent parameter?

Assume that I have a time series observations denoted by Yi where i is from 1-5000. yi=β1 x1i + β2 x2i + β3 x3i + Ci; Here x is the input. I have to find the values of Betas. But, I'm taking all ...
1
vote
0answers
29 views

Covariance update from Jacobian of transition function

In this paper on particle filtering with gradient descent, the authors sample Xk+1 through gradient descent, then update the covariance matrix P associated with Xk+1 as follows: Pi+1(k + 1|k + 1) = ...
3
votes
1answer
63 views

How do MCMC methods allow the estimation of the posterior distribution in this example?

I am reading a book example (diagram from p10) in which a person scores 9/10 on which we assumed a uniform prior. The posterior distribution could be easily worked out analytically, but the book gives ...
2
votes
0answers
39 views

Dummy coding from a bayesian stand of view

If we want to use categorical variables in regression context we are allowed to use dummy codings such as: http://www.ats.ucla.edu/stat/r/library/contrast_coding.htm Is this also required in ...
1
vote
0answers
27 views

Analysis of mcmc output

I have a sequence of Bayesian Networks for del with more epochs. For example if i work with trafic on street I can have a BN for morning, one for afternoon e one for evening. If i collect data for ...
1
vote
0answers
40 views

How do we build a model with pyMC

I am a newbie programmer with pyMC. I have a model given as following $$\rho=\sqrt(x^2+y^2)$$ $$z=f(x,y)=\frac{c^3}{\log(c)+1}\frac{\log\rho}{\rho^2}+\frac{5.3}{r^2}\rho^{-3}$$ and I want to find the ...
0
votes
1answer
65 views

Metropolis Random Walk Algorithm in Python

I am trying to implement random walk metropolis in Python for generate from a pdf $f$, which is defined in the domain: $$(0, \infty) \times [3, 4] \times (0, \infty)$$ I am using Metropolis Random ...
0
votes
1answer
28 views

Metropolis independence sampler

I need to implement an algorithm of Metropolis Independence Sampler, where the proposal distribution is a Multivariate Normal with 3 parameters. Since my function $f$ is really difficult to ...
1
vote
0answers
47 views

Using PyMC to obtain the posterior for the parameters of a parametric model?

I am a newbie with pyMC and I want to program an MCMC sampling for a complicated problem. I have a function given by in the following: $$g(r,c,\theta_1,\theta_2)=\frac{\delta_c}{\Sigma ...
0
votes
0answers
33 views

MCMC Standard error

I need to make a simulation to calculate the integral of a pdf $f(x|D)$ over a region $T$.That is, I need to evaluate $$\int_T f(x|D)\; dx$$ to do this, I just defined the function $g(x)=1$ if $x \in ...
0
votes
0answers
23 views

Proper proposal distribution in Metropolis-Hastings for a 2-state discrete process

This question is related to Understanding Metropolis-Hastings with asymmetric proposal distribution. I'm trying to draw sample paths from a 2-state markov chain using M-H. Unfortunately, I've only ...
0
votes
0answers
26 views

MC Standard Error for Metropolis Random-Walk Algorithm

I need to calculate some integrals using MCMC with Metropolis Random-Walk Algorithm. To decide the value I will accept as my integral, I will calculate 5 simulations of MCMC with size 2000, but I ...
0
votes
0answers
21 views

Metropolis Random Walk Algorithm - Covariance Matrix

I need to calculate an integral of a 3 variable density $f(x_1, x_2, x_3)$, defined in a domain $D$, in the region $$T=\{x \in R³|f(x) \geq M \}$$ using MCMC , where $M$ is a given positive constant. ...
4
votes
1answer
189 views

MCMC Modelling - can this even be solved?

I am very new to Bayesian modelling and MCMC - I would like to know if the problem I describe below can be solved. It seems to be there is too much missing information but I wanted to get your ...
4
votes
2answers
67 views

Study Metropolis Hastings

I need to study Markov Chain Monte Carlo methods, to be more specific i need to study Metropolis Hastings algorithm and all about it like convergence criteria. Who can prescribe me a book, or a ...
0
votes
1answer
51 views

Can I subsample a large dataset at every MCMC iteration?

I have a large dataset from which I want to perform a bayesian probit regression using Gibbs sampling 1. Since the dataset has one milion rows, and variables from a truncated normal must be sampled ...
1
vote
0answers
34 views

Metropolis Hastings when acceptance rate is not a probability

I need to implement a Metropolis Hastings where the acceptance probability $\alpha$ is not a probability but a logarithm of a score. The logarithm of a score is a negative float. In original ...
1
vote
1answer
29 views

Metropolis random walk using multivariate normal

I need to implement a program that generates a sample from a really complicated distribution $f$ of 3 variables. I need to implement it using Metropolis-Hastings Algorithm's and its variation and I ...
2
votes
0answers
24 views

Metropolis Algorithm for a 3 variated function

I need to implement a program that generate a sample from a 3 variated $pdf$ using the Metropolis algorithm (and its variations). I was thinking to use a 3-variated normal distribution as my proposal ...
3
votes
1answer
77 views

MCMC with Metropolis-Hastings algorithm: Choosing proposal

I need to do a simulation to evaluate an integral of a 3 parameter function, we say $f$, which has a very complicated formula. It is asked to use MCMC method to compute it and implement the ...
1
vote
1answer
59 views

Evaluating an integral using MCMC algorithm

Consider the problem of evaluating the following integral $$ \int_T f(\theta_1, \theta_2, \theta_3| D) d\Theta$$ where $f$ is a posterior density and the values of $D = (d_1, ..., d_n)$, given ...
0
votes
0answers
27 views

Explaining MCMC sampling for a Multinomial Distribution and missing at random

I understand how MCMC works, and I understand how Multinomial Distribution works. I have a dataset some of the data are missing at random (MAR). I cannot connect these two dots together (MCMC -> ...
0
votes
0answers
24 views

Checking convergence in MCMC with single chain

I have reed the Gelman-Rubin method for check the convergence in MCMC on $m\geq 2$ chain, but when I work with only one chain, what can i do to check the convergence? There is some method that work ...
1
vote
1answer
112 views

How do we define log-normal prior and a multivariate posterior log-likelihood in PyMC?

I am a newbie with pyMC and I am not still able to construct the structure of my MCMC with pyMC. I would like to establish a chain and I am confused how to define my parameters and log-likelihood ...
4
votes
1answer
42 views

Estimating the error in the average of correlated values

tl;dr I can only generate samples of a random variable $X$ using MCMC. How can I find the error in the estimate of the expected value of $X$ based on this MCMC data? The problem I have a "black ...
1
vote
1answer
69 views

Gelman and Rubin convergence diagnostic, how to generalise to work with vectors?

The Gelman and Rubin diagnostic is used to check the convergence of multiple mcmc chains run in parallel. It compares the within-chain variance to the between-chain variance, the exposition is below: ...
6
votes
1answer
125 views

How should I interpret these strange density and mixing plots when fitting a generalised pareto distribution using MCMC with JAGS?

I'm trying to fit a generalised pareto distribution to a simulated dataset using JAGS and runjags. When doing so, I get very strange density and mixing plots for the mu parameter. The sigma and xi ...
0
votes
0answers
35 views

Estimation of percentiles in multivariate posterior distribution

Background: I am using Bayesian inference to find a posterior density. The parameters are change points in a piecewise Wiener process, and I wish to calculate the hitting time of some threshold $a$. ...
5
votes
1answer
205 views

Estimating Failure Rate from Observed Data

I recently read the excellent book Probabilistic Programming & Bayesian Methods for Hackers and I'm trying to solve some problems on my own: I perform an experiment to estimate the reliability ...
2
votes
1answer
174 views

PyMC: how can I use a custom sampler for one specific variable in a model?

Basically I have a function to efficiently sample one variable in my model that I would like PyMC to use, along with its normal samplers for everything else. Since I have this function I don't have a ...
0
votes
1answer
61 views

pymc random seed doesn't guarantee the same posterior samples?

If pymc.numpy.random.seed(0) guarantee the same random number sequence to initialize a stochastic variable (say a Uniform distribution), why does its posterior samples (from trace plot) don't have the ...
4
votes
2answers
141 views

simulate dirichlet process in R

I am reading the paper of "Dirichlet Process Mixtures of Generalized Linear Models" authored by L. A. Hannah. If I would like to simulate the following model $$\mathcal{P}\sim ...
6
votes
1answer
155 views

Gibbs sampling for Ising model

Homework question: Consider the 1-d Ising model. Let $x = (x_1,...x_d)$. $x_i$ is either -1 or +1 $\pi(x) \propto e^{\sum_{i=1}^{39}x_ix_{i+1}}$ Design a gibbs sampling algorithm to generate ...
1
vote
0answers
24 views
1
vote
0answers
31 views

Why is specifying the distribution of the data different from specifying the data itself?

I am performing MCMC with pyMC on a nonlinear model, specified in Probabilistic modelling MCMC question with pyMC Imagine I have 2000 points of experimental data, normally distributed: ...
0
votes
0answers
47 views

Proving that Markov Chain Monte Carlo converges

I actually asked the same question in http://math.stackexchange.com/ as well at http://math.stackexchange.com/questions/753105/proving-that-markov-chain-monte-carlo-converges but since the question is ...
0
votes
0answers
49 views

Fitting multiple logistic functions at once with pymc

I have read a similar post here Fitting logistic function with pymc but it seems there is a rule that I shouldn't ask question in someone else's post. My approach is to fit 10 logistic functions to ...
0
votes
1answer
54 views

Why is Sampling Importance Resampling (SIR) better than Importance Sampling (IS)?

From what I understand, SIR is a mechanism for sampling from a distribution $p$ that works as follows: Approximate a target distribution $p$ using an importance sample $S$ from a proposal ...
2
votes
2answers
75 views

Can effective sample size in MCMC simulation be greater than the actual sample size?

I used coda package's effectiveSize() to find the effective sample size of my MCMC simulation. My effective sample size is greater than the actual sample size, e.g. ...
4
votes
2answers
144 views

Switchpoint detection with probabilistic programming (pymc)

I'm currently reading the Probabilistic Programming and Bayesian Methods for Hackers "book". I've read a few chapters and I was thinking on the first Chapter where the first example with pymc consist ...