Learn R Programming

BayesMRA (version 1.0.0)

rmvn_arma_chol: A function for sampling from conditional multivariate normal distributions with mean A^-1b and covariance matrix A^-1.

Description

A function for sampling from conditional multivariate normal distributions with mean A^-1b and covariance matrix A^-1.

Usage

rmvn_arma_chol(A_chol, b)

Arguments

A_chol

A A \(d \times d\) matrix for the Gaussian full conditional distribution precision matrix Cholesky factor.

b

b A \(d\) vector for the Gaussian full conditional distribution mean.

Examples

Run this code
# NOT RUN {
set.seed(111)
A <- diag(4)
A_chol <- chol(A)
b <- rnorm(4)
sample <- rmvn_arma_chol(A_chol, b)

# }

Run the code above in your browser using DataLab