Learn R Programming

convdistr (version 1.6.1)

new_MULTINORMAL: Multivariate Normal Distribution

Description

Return a DISTRIBUTION object that draw random numbers from a multivariate normal distribution using the mvrnorm function.

Usage

new_MULTINORMAL(p_mu, p_sigma, p_dimnames, tol = 1e-06, empirical = FALSE)

Value

An object of class DISTRIBUTION, MULTINORMAL

Arguments

p_mu

a vector of means

p_sigma

a positive-definite symmetric matrix for the covariance matrix

p_dimnames

A character that represents the name of the dimension

tol

tolerance (relative to largest variance) for numerical lack of positive-definiteness in p_sigma.

empirical

logical. If true, mu and Sigma specify the empirical not population mean and covariance matrix.

Author

John J. Aponte

See Also

Examples

Run this code
msigma <- matrix(c(1,0,0,1), ncol=2)
d1 <- new_MULTINORMAL(c(0,1), msigma)
rfunc(d1, 10)

Run the code above in your browser using DataLab