# metropolis-hastings's questions - Chinese 1answer

254 metropolis-hastings questions.

### MCMC sampling from a convex set

Suppose that we are given the matrix,  A = \begin{pmatrix}6/5 & 3 & -3/10 & -4/10\\ 7/5 & -7/10 & 7/10 & 14/5\\ -6/10 & -7/10 &-1/2 & 3/10\\ 12/5 & 1 & ...

### 2 Generating samples for $p(\theta_{i}|\pmb{x})$ if samples from $p(\phi|\pmb{x})$ are known

Suppose $X_{i}|\theta_{i} \sim D_{1}(\theta_{i})$ and $\theta_{i}|\phi \sim D_{2}(\phi)$. Moreover $\phi \sim D_{3}(c)$ where c is known. How would I generate samples for $p(\theta_{i}|\pmb{x})$ if I ...

### Counting function evaluations in PyMC

0 answers, 15 views python metropolis-hastings pymc
I apparently do not understand correctly how nodes are updated in PyMC. I want to count the number of times that certain nodes are computed, in order to understand where CPU time will be spent when I ...

### Quantifying acceptance rate in Metropolis-Hastings MCMC with uniform priors

0 answers, 87 views mcmc metropolis-hastings
I am optimising a model with parameters with uniform bounded priors using Metropolis-Hastings sampling. When any of the parameters in the proposed parameter set is outside of these bounds I reject ...

### 2 Marginal Likelihood of independent priors [closed]

0 answers, 34 views bayesian metropolis-hastings
Let $p(m,n|\pmb{X}) \propto f(m,n)$. Now using a metropolis Hasting's algorithm, I need to sample values for $(m,n)$. I plan on using a Bivariate normal distribution as the proposal function. I have ...

### Computing likelihood for correlated time-series models

I'm trying to use MCMC to fit different models (e.g. auto-regressive, mean-reverting etc) to some time series data. In the MCMC examples that I can find, the observations at different time points are ...

### 4 How to estimate the weight matrix in distribution $X = VWV^T$?

0 answers, 31 views mcmc metropolis-hastings
Suppose the 1 x N vector $V\in \{0,1\}^N$ comes from the pdf $f(V) = VWV^T$, where $W$ is a N x N positive definite matrix. If the weight matrix is given, I can use gibbs sampling to generate a ...

### Calculating conditional posterior of poisson linear model for football

0 answers, 28 views bayesian mcmc metropolis-hastings
I am trying to make a GIBBS/MH sampler for a bayesian model for football goal counts. (Without any specific packages(winbugs,jags etc)). Similar to this: I have the priors for the hyperparameters and ...

### Does the metropolis algorithm work on this function?

I'm working on a project using Monte Carlo. The function below is giving me trouble with the metropolis algorithm. Does this function not satisfy the features required to run the metropolis algorithm ...

### 1 Metropolis Hastings when acceptance rate is not a probability

0 answers, 130 views mcmc logarithm metropolis-hastings
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 ...