fast_rmvnorm_chol: fast_rmvnorm_chol

View source: R/mvnorm.R

fast_rmvnorm_cholR Documentation

fast_rmvnorm_chol

Description

Generate multivariate Normal draws. The function does not check the arguments, use at your own risk.

Usage

fast_rmvnorm_chol(nparticles, mean, chol)

Arguments

mean

A vector of size d specifying the mean vector of the multivariate Normal

chol

A matrix of size d x d specifying the upper triangular Cholesky factor of the covariance matrix of the multivariate Normal target, for instance obtained using the chol function of R.

n

An integer >= 1 specifying the desired number of draws

Value

A matrix of size n x d containing n d-dimensional multivariate Normal draws (one per row)

Examples

Sigma <- diag(1, 5, 5)
Sigma[1,2] <- Sigma[2,1] <- 0.3
fast_rmvnorm_chol(2, rep(0, 5), chol(Sigma))

pierrejacob/debiasedmcmc documentation built on Aug. 22, 2022, 12:41 a.m.