Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rmnorm

Random number generation for multivariate normal


Description

Simulates from a multivariate normal distribution

Usage

rmnorm(n = 1, mean = rep(0, d), varcov)

Arguments

n

number of random numbers to be generated

mean

numeric vector giving the mean of the distribution

varcov

a positive definite matrix representing the variance-covariance matrix of the distribution

Value

matrix of n rows of random vectors

Author(s)

Jim Albert

Examples

mu <- c(1,12,2)
Sigma <- matrix(c(1,2,0,2,5,0.5,0,0.5,3), 3, 3)
x <- rmnorm(10, mu, Sigma)

LearnBayes

Functions for Learning Bayesian Inference

v2.15.1
GPL (>= 2)
Authors
Jim Albert
Initial release
2018-03-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.