rmvnorm function

Generate Random Multivariate Normal Distribution

Generate Random Multivariate Normal Distribution

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

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.

Returns

A matrix that is a Multivariate Normal distribution

Examples

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

Author(s)

James J Balamuta

  • Maintainer: Steven Andrew Culpepper
  • License: GPL (>= 2)
  • Last published: 2019-09-24