MVN {EMCluster} | R Documentation |
Density of (Mixture) Multivariate Normal Distribution
Description
These functions are tools for compute density of (mixture) multivariate Gaussian distribution with unstructured dispersion.
Usage
dmvn(x, mu, LTsigma, log = FALSE)
dlmvn(x, mu, LTsigma, log = TRUE)
dmixmvn(x, emobj = NULL, pi = NULL, Mu = NULL, LTSigma = NULL, log = FALSE)
logL(x, emobj = NULL, pi = NULL, Mu = NULL, LTSigma = NULL)
Arguments
x |
the data matrix, dimension |
mu |
the centers of clusters, length |
LTsigma |
the lower triangular matrices of dispersion, length
|
log |
if logarithm returned. |
emobj |
the desired model which is a list mainly contains |
pi |
the mixing proportion, length |
Mu |
the centers of clusters, dimension |
LTSigma |
the lower triangular matrices of dispersion,
|
Details
The dmvn
and dlmvn
compute density and log density of
multivariate distribution.
The dmixmvn
computes density of mixture multivariate distribution
and is based either an input emobj
or inputs pi
,
Mu
, and LTSigma
to assign class id to each observation of
x
.
The logL
returns the value of the observed log likelihood function
of the parameters at the current values of the parameters pi
,
Mu
, and LTSigma
, with the suplied data matrix x
.
Value
A density value is returned.
Author(s)
Wei-Chen Chen wccsnow@gmail.com and Ranjan Maitra.
References
https://www.stat.iastate.edu/people/ranjan-maitra
See Also
Examples
library(EMCluster, quietly = TRUE)
x2 <- da2$da
x3 <- da3$da
emobj2 <- list(pi = da2$pi, Mu = da2$Mu, LTSigma = da2$LTSigma)
emobj3 <- list(pi = da3$pi, Mu = da3$Mu, LTSigma = da3$LTSigma)
logL(x2, emobj = emobj2)
logL(x3, emobj = emobj3)
dmixmvn2 <- dmixmvn(x2, emobj2)
dmixmvn3 <- dmixmvn(x3, emobj3)
dlmvn(da2$da[1,], da2$Mu[1,], da2$LTSigma[1,])
log(dmvn(da2$da[1,], da2$Mu[1,], da2$LTSigma[1,]))