llmvtnorm {norMmix} | R Documentation |
Log-Likelihood of Multivariate Normal Mixture Relying on mvtnorm::dmvnorm
Description
Compute the log-likelihood of a multivariate normal mixture, by calling
dmvnorm()
(from package mvtnorm).
Usage
llmvtnorm(par, x, k,
model = c("EII", "VII", "EEI", "VEI", "EVI",
"VVI", "EEE", "VEE", "EVV", "VVV"))
Arguments
par |
parameter vector as calculated by nMm2par |
x |
numeric data |
k |
number of mixture components. |
model |
assumed model of the distribution |
Value
returns the log-likelihood (a number) of the specified model for the data
(n
observations) x
.
See Also
dmvnorm()
from package mvtnorm. Our own
function, returning the same: llnorMmix()
.
Examples
set.seed(1); x <- rnorMmix(50, MW29)
para <- nMm2par(MW29, model=MW29$model)
llmvtnorm(para, x, 2, model=MW29$model)
# [1] -236.2295
[Package norMmix version 0.1-1 Index]