Mvnorm {mvtnorm}R Documentation

The Multivariate Normal Distribution

Description

These functions provide information about the multivariate normal distribution with mean equal to mean and covariance matrix sigma. dmvnorm gives the density and rmvnorm generates random deviates.

Usage

dmvnorm(x, mean, sigma, log=FALSE)
rmvnorm(n, mean, sigma)

Arguments

x Vector or matrix of quantiles. If x is a matrix, each row is taken to be a quantile.
n Number of observations.
mean Mean vector, default is rep(0, length = ncol(x)).
sigma Covariance matrix, default is diag(ncol(x)).
log Logical; if TRUE, densities d are given as log(d).

Author(s)

Friedrich Leisch <Friedrich.Leisch@ci.tuwien.ac.at>

See Also

pmvnorm, rnorm, qmvnorm

Examples

dmvnorm(x=c(0,0))
dmvnorm(x=c(0,0), mean=c(1,1))
x <- rmvnorm(n=100, mean=c(1,1))
plot(x)

[Package mvtnorm version 0.7-2 Index]