em.gauss.opti.groups: Finding the optimal number of components

Description Usage Arguments Details Value Examples

View source: R/EM_Gauss.R

Description

This function provides the user information of the fitted distributions in order to choose the optimal number of components.

Usage

1
2
em.gauss.opti.groups(y, k, alpha, beta, method = "quantile",
  epsilon = 1e-06)

Arguments

y

A data vector with observed values per bin.

k

maximum numbers of components

alpha

inverse gamma shape parameter

beta

inverse gamma rate parameter

method

method how startvalues should be evaluated. For more details see function CreateCluster

epsilon

stopping criterion

Details

This function fits for each number of components (1:k) a mixing distribution of Gaussians by using the function em.gauss. Furthermore, the fit of the distributions is measured by the two information criteria AIC and BIC.

Value

A list with mu, var, pi, loglik, ecoff, AIC, BIC for each fitted distribution

Examples

1
2
3
4
5
y <- c(2, 4, 5,6,5,2,2, 1, 1, 2,  2, 1,6,7,8,7,6, 5, 2,1)
em.gauss.opti.groups(y,
                     k= 2,
                     alpha = 1,
                     beta = 2)

sp2019-antibiotics/emGauss documentation built on Nov. 5, 2019, 9:14 a.m.