g.search: Choose the Number of Components on a Finite Mixture

View source: R/g.search.R

Number of ComponentsR Documentation

Choose the Number of Components on a Finite Mixture

Description

Search for the best number of components with non-parametric and parametric criterions

Usage

g.search(data, g = NULL, family = NULL, lim.em = 40, plot.it = TRUE, 
         col.wss = "navy", col.ic = c("orange", "red"), ...)

Arguments

data

vector or list containing the sample.

g

vector with the numbers of components.

family

parametric family to be used.

lim.em

limit of EM Iterations.

plot.it

logical; if TRUE (default) a graph is shown.

col.wss

a colour to be used in the wss curve.

col.ic

a colour to be used in the information criterion curve.

...

further arguments and graphical parameters passed to plot.

Author(s)

CASTRO, M. O.; MONTALVO, G. S. A.

Examples

## Generating a sample
data = rnorm_mix(2000, c(.5, .5), c(1, 9), c(1, 2))
## The histogram of the sample
data$plot

## Finding the number of components
g.search(data, family = "Normal")

matheuscastro43/finiteMix documentation built on March 30, 2022, 12:49 p.m.