MVN {EMCluster} | R Documentation |
These functions are tools for compute density of (mixture) multivariate Gaussian distribution with unstructured dispersion.
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)
x |
the data matrix, dimension n * p. |
mu |
the centers of clusters, length p. |
LTsigma |
the lower triangular matrices of dispersion, length p(p+1)/2. |
log |
if logarithm returned. |
emobj |
the desired model which is a list mainly contains |
pi |
the mixing proportion, length K. |
Mu |
the centers of clusters, dimension K * p. |
LTSigma |
the lower triangular matrices of dispersion, K * p(p+1)/2. |
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
.
A density value is returned.
Wei-Chen Chen wccsnow@gmail.com and Ranjan Maitra.
https://www.stat.iastate.edu/people/ranjan-maitra/
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,]))