flexmix (version 0.9-0)

FLXmclust: FlexMix Clustering Demo Driver

Description

This is a demo driver for flexmix implementing model-based clustering of Gaussian data.

Usage

FLXmclust(formula = . ~ ., diagonal = TRUE)
plotEll(object, data, ...)

Arguments

formula
A formula which is interpreted relative to the formula specified in the call to flexmix using update.formula. Only the left-hand side (respons
diagonal
If TRUE, then the covariance matrix of the components is restricted to diagonal matrices.
object
An object of class flexmix using FLXmclust model.
data
The data that were clustered.
...
Passed to eqscplot.

Value

  • FLXmclust returns an object of class FLXmodel.

Details

This is meant as a demo for FlexMix driver programming, use package mclust for real applications.

See Also

flexmix

Examples

Run this code
data(Nclus)

require("MASS")
eqscplot(Nclus)

## This model is wrong (one component has a non-diagonal cov matrix)
ex1 <- flexmix(Nclus~1, k=4, model=FLXmclust())
print(ex1)
plotEll(ex1, Nclus)

## True model, wrong number of components
ex2 <- flexmix(Nclus~1, k=6, model=FLXmclust(diag=FALSE))  
print(ex2)

plotEll(ex2, Nclus)

parameters(ex2, component=1)

Run the code above in your browser using DataLab