# mcmc's questions - Chinese 1answer

922 mcmc questions.

### 1 Estimating unobserved variance [on hold]

0 answers, 23 views variance mcmc
I'm analyzing codon usage using the model described in the following paper https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4494061/ In brief, this model uses a MCMC to estimate the pausing time for the ...

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

### Possible alteration of an existing pymc3 rugby model using additional data to add a bias towards the winning team

0 answers, 5 views python mcmc pymc
I have been applying [https://docs.pymc.io/notebooks/rugby_analytics.html][1] to my data. The problem is that I also have win/ lose probabilities from another model along with the home and away scores....

### 1 Bayesian Inference for More Than Linear Regression

I learned about MCMC and variational inference for Bayesian inference, and I would like to try it out in some regression problem. However, all existing related models I know falls within either of the ...

### -1 In LDA, after collapsed Gibbs sampling, how to estimate values of other latent variables?

I watched a video on coursera, everything went well until the following slide around 12'50''. I read it in other papers that to estimate latent variables say $\Phi$ we can draw a sample $Z'$ of the ...

### In the gamm4/lme packages in R, how can we set the number of knots using the $s(x, k)$ function? [closed]

0 answers, 18 views r bayesian lme4-nlme mcmc gamm4
In In the gamm4/lme packages in R, I am a bit confused about hwo to set the number of knots for splines. Suppose that $Y$ is my ...

### 1 Importance Sampling Marginal Likelihood

Marginal likelihood evaluation for a Poisson data model. Simulate 10 observations from a known Poisson distribution with expected value 2. Use a Gamma(1,1) prior distribution and compute the ...

### 3 Choosing Prior for $\sigma^2$ in the Normal (Polynomial) Regression Model $Y_i | \mu, \sigma^2 \sim \mathcal{N}(\mu_i, \sigma^2)$

1 answers, 40 views bayesian mcmc nonlinear-regression prior

### 3 MCMC with flat prior vs. glmer

1 answers, 44 views bayesian mixed-model mcmc frequentist
Is MCMC-based mixed model with flat prior basically just a robust variant of a classical mixed model? I mean – frequentist analyses work with a flat prior anyway so the only difference should be in ...

### 14 Posterior distribution and MCMC [duplicate]

I have read something like 6 articles on Markov Chain Monte carlo methods, there are a couple of basic points I can't seem to wrap my head around. How can you "draw samples from the posterior ...

### 1 R - what units are MCMCglmm posterior means in? [closed]

1 answers, 29 views r bayesian mcmc
my question is probably amateurish but I can't seem to find the answer anywhere. In what metric are the MCMCglmm package's posterior means for family = "categorical"? I suppose that they can't be ...

### R - what units are MCMCglmm posterior means in?

0 answers, 25 views r bayesian mcmc glmm
my question is probably amateurish but I can't seem to find the answer anywhere. In what metric are the MCMCglmm package's posterior means for ...

### MCMC software to sample from posteriors of unusual probability distributions

1 answers, 25 views bayesian sampling mcmc prior posterior
Is there a library, or package---preferably in (but not restricted to) python or R---that let you easily sample from the posterior of "exotic" distributions, i.e. distributions that are not commonly ...

### 3 Implementing Predictive Posterior Distribution Using Stan

0 answers, 58 views bayesian mcmc prior posterior stan
Background I had an example that sought to demonstrate the posterior predictive distribution in the context of a normal measurement model. The data that was used is as follows: ...

### Understanding fitted function in binomial model with brms package

1 answers, 27 views r bayesian mcmc
I've a question regarding the fitted values of a binomial model using the brms package. I have this code: ...

### 4 Variance of the Sum of Correlated Variables in R

1 answers, 106 views r correlation variance mcmc
I'm looking to compute $n\text{Var}\left(\frac{1}{n}\sum_{i=1}^nX^{(i)}\right) = \frac{1}{n}\sum_{i=1}^n\sum_{j=1}^n\text{Cov}\left(X^{(i)},X^{(j)}\right)$ in R. Assuming the X's not to be iid, we get ...

### 1 How to Characterise These Markov Chains?

1 answers, 40 views mcmc markov-process
I have the following two Markov chains: 1. 2. I'm trying to characterise them. Unfortunately, I have no idea how to "characterise" them. At best, I can tell that chain 2 looks a lot "healthier" ...

### 1 References on calculating posterior mode in multiclass discrete Ising model

0 answers, 38 views mcmc posterior discrete-data
I'd like to calculate the posterior mode (maximum a posteriori estimate) for $\Pr[\,X \,|\, Y\,]$ for a model where $X$ is generated by an Ising model on a two-dimensional lattice and $Y$ are noisy ...

### 2 Modelling Parameter $r = \max\limits_{i = 1, \dots , 10} p_i - \min\limits_{i = 1, \dots , 10} p_i$ of Binomial Random Variable in Stan/RStan/R

1 answers, 34 views bayesian simulation mcmc posterior rstan
I'm trying to use Stan and R to fit a model that, uhh, models the observed realisations $y_i = 16, 9, 10, 13, 19, 20, 18, 17, 35, 55$, which are from a binomial distributed random variable, say, $Y_i$,...

### 8 Censoring/Truncation in JAGS

2 answers, 3.603 views mcmc censoring truncation jags
I have a question on how to fit a censoring problem in JAGS. I observe a bivariate mixture normal where the X values have measurement error. I would like to model the true underlying 'means' of the ...

### 1 Should Bayesian estimated error smaller than MLE?

I am dealing with a fitting problem. Specifically, I am fitting a Lorentzian profile to the power spectrum of an solar-like oscillating star. Three parameters in the Lorentzian profile characterize ...

### Model comparison with Bayesian Regression Splines of a single multivariate observation

0 answers, 20 views bayesian mcmc model-comparison splines
I am using the Poisson form of the software provided by Wallstrom et al to model some time-series data which should be well modelled by a non-stationary Poisson process. One of the main parameters ...

### 2 Understanding poor performance of MCMC Bayesian linear regression

0 answers, 64 views bayesian mcmc
I'm trying to reproduce Figure 2 from this paper. In summary, I have the regression model $$Y \sim N(\mu, \sigma^2) \\ \mu = \alpha + \beta_1X_1 + \beta_2X_2$$ The prior distributions for the ...

### 1 Metropolis Hastings Kernel - Relation Indicator function and Dirac Mass

0 answers, 18 views self-study mcmc metropolis-hastings

### 9 Gibbs sampling for Ising model

1 answers, 2.030 views self-study sampling mcmc gibbs
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 ...

### 3 Detecting convergence in Random walk

0 answers, 72 views mcmc convergence random-walk
I am trying to detect convergence of a random walk on a graph. After doing some preliminary research, the Geweke convergence diagnostic seems to be most commonly used for this. This diagnostic calls ...

### How to set step-size in Hamiltonian Monte Carlo?

1 answers, 66 views machine-learning mcmc tensorflow
I'm using Hamiltonian Monte Carlo (HMC) implementation in Edward, a probabilistic programming library built on top of TensorFlow. One of the hyper-parameters of HMC is the step size: ...

### 2 Choice of temperatures for computing evidence interval and posterior with Parallel-Tempered MCMC

1 answers, 52 views bayesian mcmc
I have changed my MCMC sampler from Ensemble to Parallel-Tempered (in emcee) in order to get an estimate of the evidence integral. In practice this requires setting ...

### 3 Is burn-in necessary for MCMC/Gibbs sampling if I have samples from the true distribution already?

0 answers, 46 views sampling mcmc gibbs
Say I have some samples from a distribution $p$, and I want to get more samples using MCMC/Gibbs sampling. Since the existing samples are known from the equilibrium distribution $p$, if I use them as ...

### Change units in posterior MCMC Bayesian summary

1 answers, 29 views bayesian mcmc
I have 4000 iterations from an MCMC summarizing the posterior distribution. In the model used to estimate the posterior (a GLMM), my response variable was in g/m2, but I need to report the result in ...

### How does Metropolis acceptance rate vary with the number of dimensions?

0 answers, 30 views bayesian mcmc metropolis-hastings
Intuitively, if I want to update two parameters in one step, I have to come up with a proposal that are good for both parameters. Assuming that the parameters are independent, is it correct to ...

### 2 Why does $P(\theta_1\mid D, \theta_2) \propto P(D \mid \theta_1, \theta_2)P(\theta_1)$ hold?

1 answers, 55 views probability bayesian mcmc posterior gibbs
Suppose that in a Bayesian framework we have observed data $D$, using independent prior distributions on the parameters of the model, denoted by $\theta_1, \theta_2$. Then, the joint posterior ...

### -1 Poisson likelihood for count data - comparing (scaled) model and observations

I have two 2D histograms - one has observed counts and the other has predicted counts from a model. I am comparing both of them using a Poisson likelihood while varying the parameters of the model. ...

### MCMC estimation - relative numerical efficiency

I run a MCMC in r and along with the parameter mean values from the posterior I also got the standard deviation, the naive standard error of the mean and the relative numerical efficiency. How is ...

### 1 plot log likelihood function evolution in mcmc simulations

0 answers, 145 views r mcmc likelihood gibbs
Is it possible to plot log likelihood function evolution in mcmc simulations? I have a mixture model and its parameters are estimated using the gibbs sampling method in r environment and using the ...

### 1 Time series forecasting with Markov Chain, Markov Switch etc [closed]

I have a data set which contains closing prices of a stock every day (total 1 year). Can i forecast that set like 1 or 2 year with using Markov methods? If yes, then how?

### Priors for log-normally distributed data [duplicate]

I am interested in using a Linear Mixed Effects model to analyse some data with 3 nested random factors to evaluate which factor(s) contribute most to the variability observed. The data has a log-...

### prior for initial values of Kalman Filter

I'm studying Carter and Kohn's (1994) implementation of the Gibbs sampler for Bayesian analysis of state space models. In their paper, they assume the starting value, call it $\beta_0$, of the state ...