2
$\begingroup$

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 way to sample only from the portion of the normal distribution where $x_i \in [0,a)$ for all $i \leq n$?

The reason for the prior distribution in that form is because those are the feasible range for $X_1$. I want to implement Gibbs sampling, but not sure how to sample directly. I'd also be interested in other suggestions for the prior distribution.

$\endgroup$
0
$\begingroup$

I discovered the package truncnorm in R which allows you to sample from a truncated multivariate normal distribution. It allows for both rejection sampling or a Gibbs approach that approximates the truncated distribution.

http://cran.r-project.org/web/packages/truncnorm/index.html

$\endgroup$
0
$\begingroup$

You can, but it's not necessarily going to be efficient in high dimensions. Gibbs sampling can be very slow if you have small eigenvalues in your covariance matrix. Rejection sampling can be even worse. A good approach is exact HMC.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.