sample_mvnorm: Sample random values from the multivariate normal...

View source: R/utilities.R

sample_mvnormR Documentation

Sample random values from the multivariate normal distribution

Description

Sample random values from the multivariate normal distribution

Usage

sample_mvnorm(mu, sigma)

Arguments

mu

mean vector

sigma

covariance matrix

Samples multivariate normal variables by multiplying univariate random normal variables by the cholesky decomposition of the covariance matrix.

If mu is length 1 then just uses rnorm instead.


rbmi documentation built on Nov. 24, 2023, 5:11 p.m.