Learn R Programming

ADtools (version 0.5.4)

dmvnorm0: The density of the multivariate normal distribution

Description

The density of the multivariate normal distribution

Usage

dmvnorm0(x, mean, sigma, log = FALSE)

Arguments

x

vector or matrix of quantiles. If x is a matrix, each row is taken to be a quantile.

mean

numeric vector; the mean vector.

sigma

numeric matrix; the covariance matrix.

log

logical; if TRUE, returns the log value.

Examples

Run this code
# NOT RUN {
n <- 10
d <- 2
sigma <- crossprod(randn(d, d))
x <- rmvnorm0(n, mean = numeric(d), sigma = sigma)
dmvnorm0(x, mean = numeric(d), sigma = sigma)

# }

Run the code above in your browser using DataLab