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

learn more… | top users | synonyms

-1
votes
0answers
13 views

How to use MCMC samples for parameter estimation

My background is in optimization, and I am new in Bayesian inference. Very broadly speaking, in my problem a parameter $\theta$ can have any subset of the set of features $\{a,b,c,d,e,f\}$. My goal ...
1
vote
1answer
12 views

JAGS, cannot evaluate upper index of counter

I asked this question at the JAGS sourceforge help forum but didn't get response there. I have the following JAGS model: ...
-2
votes
0answers
13 views

Principal stratification in BUGS or JAGS or STAN? [on hold]

Does anyone know examples of principal stratification analyses in BUGS or JAGS or STAN?
0
votes
0answers
18 views

Base sales in multivariate time series | MCMC model

I have been looking around online for good resources that explain how one would go about calculating base sales when preforming marketing mix modeling. I was told by a colleague that essentially they ...
1
vote
0answers
48 views
+50

Dirichlet Processes for clustering: how to deal with labels?

Q: What is the standard way to cluster data using a Dirichlet Process? When using Gibbs sampling clusters appear and dissapear during the sampling. Besides, we have a identifiability problem since ...
2
votes
0answers
29 views

Likelihood maximization: MCEM algorithm versus MCMC algorithm

Hello Everyone this is my first question. I am a particle physicist and I am doing some empirical studiues on parameters estimation using different methods (this might give me some handle to study on ...
1
vote
0answers
10 views

Symmetric Distribution for MCMC Continuous Distribution

I have a sampling distribution $g(X^{'}| X=x)$ such that $$ \log(X^{'})|X=x\sim N(\log(x), \sigma^2)$$ This ensures that our samples are in $(0, \infty)$. Now I would like to use the Metropolis ...
1
vote
1answer
18 views

Interpretation of absurdly large (but probably correct) Bayes Factors?

I estimated a Bayes factor to compare a hypothetical model against a null-model (which obviously by visual comparison of the posterior predictive with the data) fails to capture a certain aspect in ...
2
votes
0answers
40 views

how to determine if two dice are fair using pymc and roll data

My scenario is that I have two six-sided dice (D1 and D2), either of which may be fair or loaded (biased). I have samples of combined roll data (i.e. D1 + D2). I would like to view the posterior ...
-1
votes
1answer
43 views

Book recommendation on statistical computing? [closed]

Topics on importance sampling, Monte Carlo, MCMC etc.
0
votes
0answers
14 views

Bayesian inference of marginal likelihood using ABC

I have the following situation: suppose data $D = \{x_i\}$ iid are generated through some process with density function $f(x_i | \alpha, \beta)$ (which I think will be negative binomial) and we'd like ...
2
votes
0answers
17 views

How to evaluate a Bayesian forecast?

Suppose that I have a predictive posterior, which is an attempt to predict some one-step ahead forecasted value $\hat{y}_{T+1}$. How do I assess if my posterior has done a good job or not? If we had ...
-1
votes
0answers
28 views

Model specification in MCMCpackage

I am trying to run a simple one-dimensional Bayesian model on a 9 (respondents)*43(items) dataset, but I want to specify separate normal priors for my item-parameters. With sample data, I run ...
1
vote
1answer
28 views

marginal conditional distribution from MCMC output [duplicate]

I have a MCMC sampler that targets $$\mathbb{P}(U_1,U_2,...U_n \mid G(U) \leq 0)$$ where $U=(U_1,U_2,...U_n)^T$. I realize now I am more interested in estimating the conditional density $$p_k = p(u_k ...
2
votes
2answers
335 views

Metropolis-Hastings Algorithm within Gibbs Sampling

I have this $f$ function below. $$ f(x_1,x_2)\propto \left(\dfrac{x_1}{x_2}\right)\left(\dfrac{\alpha}{x_2}\right)^{x_1-1}exp\left\{-\left(\dfrac{\alpha}{x_2}\right)^{x_1} \right\}I_{R^+}(x) $$ where ...
1
vote
1answer
42 views

Marginal Likelihood in PYMC

I am using the PYMC toolbox in python in order to carry out a model selection problem using MCMC. What I would like to have for each model is the marginal log-likelihood (i.e. model evidence). The ...
1
vote
0answers
18 views

How to monitor local variables in STAN? [migrated]

I'm currently trying to port some JAGS models to STAN. I get some strange errors "stan::prob::exponential_log(N4stan5agrad3varE): Random variable is nan:0, but must not be nan!" and to debug those I ...
2
votes
0answers
40 views

Generating a skewed distribution given the median and left and right “$1\sigma$” limits [duplicate]

Edit: I found a solution to the problem, which is at the bottom of the post. I'm going to leave the post as it is in case someone else encounters a similar problem! I was banging my head to a ...
4
votes
1answer
65 views

What is the simple standard error for MCMC?

Simply put: suppose that we have observed $X=\left\{ X_{1},\ldots,X_{n}\right\}$. We then need to calculate some statistic $T$ using MCMC, using $M$ loops (By "loops" I mean the number of times the ...
1
vote
1answer
31 views

MCMC sampling with sum constraints

I'm interested in sampling a collection of variables with a sum constraint on them. For a simplified example: Prior: $X \sim \mathcal{N}(0, 1)$ $Y \sim \mathcal{N}(0, 1)$ Observation: $X + Y = 1$ ...
0
votes
0answers
9 views

How to do panel data analysis in Bayesian model with pymc [migrated]

everyone. I have a question on how to do panel data analysis in Bayesian model with pymc. The data is like: ...
0
votes
1answer
53 views

Transformation of variables (Metropolis Hastings)

Say I have a bunch of data from a Poisson distribution and I want to find out my posterior i.e. I'm data fitting: $p(\lambda | X) \sim p(X|\lambda)p(\lambda)$ where $p(X|\lambda) = ...
0
votes
1answer
28 views

Gibbs Sampling for Boltzmann Machines

David Mac Kay, in his book on machine learning talks about Boltzmann machines, and on pg. 3 here http://www.inference.phy.cam.ac.uk/itprnn/ps/521.526.pdf He says "the second equation ...
8
votes
2answers
401 views

Is Markov chain based sampling the “best” for Monte Carlo sampling? Are there alternative schemes available?

Markov Chain Monte Carlo is a method based on Markov chains that allows us to obtain samples (in a Monte Carlo setting) from non-standard distributions from which we cannot draw samples directly. My ...
1
vote
0answers
24 views

“Observed node inconsistent ” when binomial success rate exactly one

I observed some curious behavior in JAGS (rjags). There probably is a good reason for it, but I can't figure it out: As part of a more complex model I have these statements: ...
3
votes
0answers
36 views

Fast Algorithm for Bayesian Measurement Model

I want to estimate a Bayesian Measurement model. That is I am concerned with the rating of each judge $j$ of the value of some trait $z$ for each observation $i$. Not all raters will have rated each ...
5
votes
1answer
42 views

How to derive Gibbs sampling?

I'm actually hesitating to ask this, because I'm afraid I will be referred to other questions or Wikipedia on Gibbs sampling, but I don't have the feeling that they describe what's at hand. Given a ...
0
votes
0answers
18 views

Overestimating variance with MCMC

I'm working with a very specific type of proposal distribution in MCMC algorithm. To validate it I use a simple multivariave Gaussian with $\mu=0$ and $\Sigma$ an identity matrix. The proposal ...
2
votes
0answers
18 views

Comparison of MCMC methods? [closed]

Where can I find a good comparison of Gibbs, Metropolis, and Hybrid MCMC in R or Python? I have thus far found this ...
4
votes
1answer
186 views

computing the posterior of two Gaussian probability distributions

I am a bit confused how to solve a Bayesian statistics problem. I have a parameter $\epsilon^s$ which is defined as following: $$\epsilon^s=\frac{\epsilon-g(\pi,z)}{1-g^*(\pi,z)\epsilon}$$ where ...
1
vote
1answer
35 views

Constructing Bayesian model for randomly picked points from a sine wave

I am trying to apply some data analysis on data which is generated by picking points from a sine wave with some noise added in. I am purposefully ignoring the time dependence, so just collecting data ...
0
votes
0answers
16 views

Gibbs sampler with beta posterior

Drive the Gibbs sampler for the joint posterior for a beta distribution X~Beta (a,b) with parameters alpha and phi, also stating the conditional distribution
0
votes
2answers
96 views

What is going on in an MCMC chain?

I'm currently running some data through the MCMCglmm package in R. I was wandering what actually happens in the chain that is created? I have a multiresponse model (as a quick overview of the data: ...
0
votes
0answers
44 views

how to integrate over product of two inverse-gammas

I'm trying to find a nice closed form for an integral which has the following form: $\int_{0}^{\infty} x^{-\theta_1 -1} \exp \bigl( - \frac{\beta_1}{x} \bigr) (ax +b)^{-\theta_2 -1} \exp \bigl( - ...
0
votes
0answers
21 views

Gibbs Sampling with given Posterior Distribution

I'm trying to implement an algorithm from a paper which assigns three types of labels $m_i, m_d$ and $m_s$. Here $m_i$ labels a collection of documents $G_i , m_d$ a subcollection of them and $m_s$ ...
1
vote
1answer
54 views

Skewed posterior distribution on constrained parameter space for Bayesian inference of MCMC. Advice on what to do?

I am running a fully Bayesian MCMC procedure to estimate some time series models, and my model has a lot of parameter estimates. In particular, one of these parameters, $\phi$, is $\in [-1,1]$. The ...
0
votes
0answers
26 views

PANEL model (MCMC): Equivalent of system GMM in MCMC

I want to fit a PANEL model via MCMC. I am concerned, that I got some covariates that are endogenous. I use MCMC for various reasons, particularly cause I got some spatial dependencies in my model. I ...
0
votes
1answer
49 views

General questions on MCMC

This is a continuation of the following question. The previous link was related to rejection sampling. This is related to MCMC. General questions on rejection sampling 1a. As far as I understand, ...
1
vote
1answer
43 views

General questions on rejection sampling

I am new to Bayesian methods. I was going through a chapter on sampling. I have a few questions related to it. Please help me get these clarified. As far as I understand, rejection sampling will not ...
1
vote
2answers
35 views

Sampling from a portion of the normal distribution?

I have a a conditional distribution $p(X_1 | \theta) \propto MVN(\mu, \Omega) \pi(X_1)$ where $X_1=[x_1, x_2, \dots, x_n]'$ and $\pi(X_1)=1$ when all $x_i \in [0,a)$ and $0$ otherwise. Is there any ...
4
votes
2answers
67 views

Gibbs Sampling and Probability Notation

Problem 1 I am trying to implement Gibbs Sampling for the following problem: There is a grid measuring 3 x 3 sites, each "site" can be designated in a state, $X$, of 1 or -1. The sites are numbered ...
2
votes
0answers
33 views

Refining “good” mixing time estimate

Fix a Markov chain $\{ X_{t} \}_{t \in \mathbb{N}}$ with mixing time $\tau_{\mathrm{mix}}$. Assume that I know some finite bound on the mixing time $\tau_{\mathrm{mix}} < \tau < \infty$, and ...
2
votes
0answers
19 views

Using intermediate timesteps in Hamiltonian Monte Carlo

Hamiltonian Monte Carlo methods are usually built on a symplectic time-reversible ODE integrator such as the Leapfrog method. A HMC iteration uses the following sequence of steps: Sample new momenta ...
4
votes
1answer
44 views

What to do when rejecting a proposed point in MCMC?

I'm writing a simple Metropolis-Hastings MCMC algorithm. Every time a move gets accepted, the point is added to a list of accepted points. I wonder what exactly I should do when a proposed move has ...
0
votes
0answers
19 views

too large DIC improvment a problem?

I have a question regarding large changes in DIC difference across models. For some models, I am getting an improvement of about 70 000 DIC points. My mind is waving a red-flag here. My question is if ...
0
votes
0answers
23 views

Gibbs within Metropolis

Consider a model with two parameters, $\alpha$ and $\beta$. We want to sample these two parameters conditioning on two data points, $d_1$ and $d_2$. Is it possible to use an algorithm like this: 1) ...
1
vote
0answers
29 views

Fitting multiple models to a noisy measurement

I have measured a quantity for a set of data contains couple of thousands objects. Since the measurement is very noisy, I need a set of data contains a lot of objects. Then I have a model based on the ...
2
votes
1answer
111 views

Maximizing likelihood versus MCMC sampling: Comparing Parameters and Deviance

I am working in R. I use lm() for maximizing the likelihood in the first analysis, and STAN to sample from the posterior in a second analysis. ...
0
votes
0answers
16 views

What happens if you replace the sampling procedure in MCMC with maximization when fitting a HMM?

When using Markov chain monte carlo to fit hidden Markov models, after you use the forward algorithm to obtain the posterior distribution, you sample the hidden states for the current observation. ...
1
vote
1answer
107 views

Simple model selection example in PYMC

I am currently experimenting with PYMC and I am trying out a simple example so that I start learning how things work (I am also a Python beginner, but an experienced machine learner). I have set ...