Learn R Programming

MSBVAR (version 0.3.2)

rmultnorm: Multivariate Normal Random Number Generator

Description

Generates multivariate normal random variates for give mean and covariance vectors. Can also handle generation of multivariate normal deviates with singular covariance distributions via singular value decomposition (SVD).

Usage

rmultnorm(n, mu, vmat, tol = 1e-10)

Arguments

Value

Matrix of the random draw that is conformable with the input mu.

Details

Generates $n$ draws from a multivariate normal distribution with mean matrix mu and covariance matrix vmat.

See Also

rnorm

Examples

Run this code
rmultnorm(1, matrix(c(1,2),2,1), vmat=matrix(c(1,1,0,1),2,2))

Run the code above in your browser using DataLab