Learn R Programming

VBmix (version 0.3.2)

mvndensity:

Description

get densities of a set of elements w.r.t a multivariate normal.

Usage

mvndensity(mean, cov, data, rescaled=FALSE)

Arguments

mean
numeric vector, mean of the multivariate normal.
cov
covariance matrix of the multivariate normal.
data
matrix of row-elements.
rescaled
if TRUE, a variant accouting for data dimensionality is computed.

Value

numeric vector containing densities.

See Also

mvngen

Examples

Run this code
temp <- mvngen(c(0, 0), diag(2), 5)
mvndensity(c(0,0), diag(2), temp)
#[1] 0.137188286 0.032318242 0.005181099 0.047312602 0.033178600

Run the code above in your browser using DataLab