1

I'm doing MCMC simulation and a posterior is hard to sample.

Suppose I need to sample a vector $\beta \sim N(M_{\beta} , \Sigma_{\beta})1_{\beta_{K}>0}$, which mean $\beta$ is a vector with length K and the last element $\beta_{K}$ should be positive.

Houtin
  • 33
  • 5
  • 1
    If you sample the vector ignoring the constraint, how often is the constraint violated? – jbowman Sep 10 '18 at 19:49
  • Why don't you do rejection sampling just like you described? Also why is it $\beta_{KK}$ and not $\beta_K$?$ – Aksakal Sep 10 '18 at 20:02
  • @jbowman, in my code ,since it converge quickly, if without constraint, it is 100% – Houtin Sep 10 '18 at 20:03
  • @Aksakal, if I reject it. The accept rate is very low. And sorry about my fault in description, I have correct it. – Houtin Sep 10 '18 at 20:06
  • So, sample from the truncated marginal distribution of the last element and then sample from the conditional distribution, which itself is MVN. The first part is potentially difficult if the truncation is severe: see https://stats.stackexchange.com/questions/238602/sampling-from-truncated-normal for a solution. – whuber Sep 10 '18 at 20:27

0 Answers0