BVN_Gibbs | R Documentation |
Function returns Gibbs samples from a bivariate normal target density.
BVN_Gibbs(n, mu, sigma)
n |
Sample size of the Markov chain. |
mu |
A 2 dimensional vector. Mean of the target normal distribution. |
sigma |
2 x 2 symmetric positive definite matrix. The covariance matrix of the target normal distribution. |
An n x 2 matrix of the Gibbs samples.
n <- 1e3
mu <- c(2, 50)
sigma <- matrix(c(1, 0.5, 0.5, 1), nrow = 2)
out <- BVN_Gibbs(n, mu, sigma)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.