BVN_Gibbs {mcmcse} | R Documentation |
MCMC samples from a bivariate normal distribution
Description
Function returns Gibbs samples from a bivariate normal target density.
Usage
BVN_Gibbs(n, mu, sigma)
Arguments
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. |
Value
An n x 2 matrix of the Gibbs samples.
Examples
n <- 1e3
mu <- c(2, 50)
sigma <- matrix(c(1, 0.5, 0.5, 1), nrow = 2)
out <- BVN_Gibbs(n, mu, sigma)
[Package mcmcse version 1.5-0 Index]