rmvnorm: Generate Random Multivariate Normal Distribution

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

Creates a random Multivariate Normal when given number of obs, mean, and sigma.

Usage

1
rmvnorm(n, mu, sigma)

Arguments

n

An int, which gives the number of observations. (> 0)

mu

A vector length m that represents the means of the normals.

sigma

A matrix with dimensions m x m that provides the covariance matrix.

Value

A matrix that is a Multivariate Normal distribution

Author(s)

James J Balamuta

Examples

1
2
# Call with the following data:
rmvnorm(2, c(0,0), diag(2))

Example output

           [,1]       [,2]
[1,] -0.8216181 -1.3703393
[2,]  0.2246808 -0.6608293

fourPNO documentation built on Sept. 24, 2019, 9:05 a.m.