Generate Random Multivariate Normal Distribution

Share:

Description

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

Usage

1
rmvnorm(n, mu, S)

Arguments

n

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

mu

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

S

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

Value

A matrix that is a Multivariate Normal distribution

Author(s)

James J Balamuta

See Also

TwoPLChoicemcmc and probitHLM

Examples

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