Learn R Programming

SimCorMultRes (version 1.4.0)

rsmvnorm: Simulating Continuous Random Vectors from a Multivariate Normal Distribution

Description

Utility function to simulate continuous random vectors from a multivariate normal distribution such that all the marginal distributions are univariate standard normal.

Usage

rsmvnorm(R = R, cor.matrix = cor.matrix)

Arguments

R
integer indicating the sample size.
cor.matrix
matrix indicating the correlation matrix of the multivariate normal distribution.

Value

Returns R random vectors of size equal to the row dimension of cor.matrix.

Details

Checks are made to ensure that cor.matrix is a positive definite correlation matrix. This is determined by the eigenvalues.