powered by
Computes the density of an observation for a multivariate Gaussian distribution.
dmg(x, mu, Sig, LOG = FALSE)
A numeric value of the density of the observation x for the multivariate Gaussian distribution with parameters mean, and Sig.
x
mean
Sig
A numeric vector of dimension (1 x p).
A (1 x p) numeric vector of location values.
A (p x p) numeric covariance matrix.
A logical value indicating if the logarithm of the density is returned (default: LOG = FALSE).
x = c(1.2, 0.4, 0.8) mu = c(1, 0, 2) Sig = matrix(c(1.0, 0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.5, 1.0), nrow = 3, ncol = 3) dens = dmg(x, mu, Sig, LOG = FALSE) dens
Run the code above in your browser using DataLab