llnorMmix {norMmix} | R Documentation |
Log-likelihood of parameter vector given data
Description
Calculates log-likelihood of a dataset, tx, given a normal mixture model as
specified by a parameter vector.
A parameter vector can be obtained by applying nMm2par
to a
norMmix
object.
Usage
llnorMmix(par, tx, k,
model = c("EII", "VII", "EEI", "VEI", "EVI",
"VVI", "EEE", "VEE", "EVV", "VVV"))
Arguments
par |
parameter vector |
tx |
Transposed numeric data matrix, i.e. |
k |
number of mixture components. |
model |
assumed distribution model of normal mixture |
Value
returns the log-likelihood (a number) of the specified model for the data
(n
observations) x
.
See Also
Our alternative function llmvtnorm()
(which is based on
dmvnorm()
from package mvtnorm).
Examples
set.seed(1); tx <- t(rnorMmix(50, MW29))
para <- nMm2par(MW29, model=MW29$model)
llnorMmix(para, tx, 2, model=MW29$model)
# [1] -236.2295
[Package norMmix version 0.1-1 Index]