logLik.MclustDA: Log-Likelihood of a 'MclustDA' object

Description Usage Arguments Value Author(s) See Also Examples

Description

Returns the log-likelihood for a MclustDA object.

Usage

1
2
  ## S3 method for class 'MclustDA'
logLik(object, data, ...)

Arguments

object

an object of class 'MclustDA' resulting from a call to MclustDA.

data

the data for which the log-likelihood must be computed. If missing, the observed data from the 'MclustDA' object is used.

...

further arguments passed to or from other methods.

Value

Returns an object of class 'logLik' with an element providing the maximized log-likelihood, and further arguments giving the number of (estimated) parameters in the model ("df") and the sample size ("nobs").

Author(s)

Luca Scrucca

See Also

MclustDA.

Examples

1
2
3
4
5
6
## Not run: 
irisMclustDA <- MclustDA(iris[,1:4], iris$Species)
summary(irisMclustDA)
logLik(irisMclustDA)

## End(Not run)

Example output

Package 'mclust' version 5.4.3
Type 'citation("mclust")' for citing this R package in publications.
------------------------------------------------ 
Gaussian finite mixture model for classification 
------------------------------------------------ 

MclustDA model summary: 

 log-likelihood   n df       BIC
      -182.9208 150 42 -576.2884
            
Classes       n Model G
  setosa     50   XXX 1
  versicolor 50   XXX 1
  virginica  50   XXX 1

Training classification summary:
            Predicted
Class        setosa versicolor virginica
  setosa         50          0         0
  versicolor      0         48         2
  virginica       0          1        49
Training error = 0.02 
'log Lik.' -182.9208 (df=42)

mclust documentation built on Nov. 20, 2020, 5:09 p.m.