Learn R Programming

mmeln (version 1.5)

dmnorm: Multivariate Normal Density Function

Description

Function to estimate Multivariate Normal Density Function

Usage

dmnorm(X, Mu, Sigma)

Value

This command return a vector of density.

Arguments

X

A matrix or a vector (if you have only one multivariate observation) containing the data. This matrix may contain missing data.

Mu

A mean vector or a matrix where the number of column is p. If Mu is a matrix and X a vector, the density is evaluated for each value of Mu specified in the matrix Mu

Sigma

The covariance matrix. This matrix must be symmetric positive definite(all eigen values are positive. see eigen)

Author

Charles-Édouard Giguère

Details

This methods compute the value of the density function for a given data and a given set of parameters. It works like the R command dnorm in the stats package. Although this methods can be used directly it is not intended this way. If you want to estimate density of multivariate normal distribution, the library mvtnorm is more appropriate

References

M.S. Srivastava (2002), Methods of Multivariate Statistics, WILEY

See Also

mmeln,eigen

Examples

Run this code

dmnorm(1:3,1:3,diag(3))

Run the code above in your browser using DataLab