Description
Usage
Arguments
Author(s)
See Also
Examples
These functions provide the density function and a random number
generator for the multivariate normal
distribution with mean equal to mean
and covariance matrix
sigma
.
 (x, = (0, p), = (p), = , checkSymmetry = )
(n, = (0, ()), = (()),
method=("eigen", "svd", "chol"), pre0.9_9994 = , checkSymmetry = )

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).

method 
string specifying the matrix decomposition used to
determine the matrix root of sigma . Possible methods are
eigenvalue decomposition ("eigen" , default),
singular value decomposition ("svd" ), and
Cholesky decomposition ("chol" ). The
Cholesky is typically fastest, not by much though.

pre0.9_9994 
logical; if FALSE , the output produced in mvtnorm
versions up to 0.99993 is reproduced. In 0.99994, the
output is organized such that rmvnorm(10,...) has the
same first ten rows as rmvnorm(100, ...) when called
with the same seed.

checkSymmetry 
logical; if FALSE , skip checking whether the
covariance matrix is symmetric or not. This will speed up the
computation but may cause unexpected outputs when illbehaved
sigma is provided. The default value is TRUE .

Friedrich Leisch and Fabian Scheipl
pmvnorm
, rnorm
, qmvnorm
1
2
3
4
5
6
7
8
9
10
11
12
13  (x=(0,0))
(x=(0,0), =(1,1))
< ((4,2,2,3), =2)
x < (n=500, =(1,2), =)
(x)
(x)
x < (n=500, =(1,2), =, method="chol")
(x)
(x)
(x)

[1] 0.1591549
[1] 0.05854983
[1] 0.8462846 1.8995820
,1] ,2]
[1,] 3.781973 1.880966
[2,] 1.880966 2.959110
[1] 1.030278 2.010795
,1] ,2]
[1,] 4.035400 2.023131
[2,] 2.023131 2.962861
mvtnorm documentation built on July 1, 2020, 10:18 p.m.