createCluster: Create Cluster

Description Usage Arguments Details Value Examples

View source: R/createCluster.R

Description

The function estimates the mean and variance of the k groups of the underlying input data y.

Usage

1
createCluster(y, k, method = c("quantile", "binbased"))

Arguments

y

a (nx2) matrix (nx2) First column: number of bin, Second column: number of observation per bin

k

a numeric value - number of components (fitted distributions)

method

the method to be used for finding the k groups of data. For more information see Details

Details

For the input parameter method are two options available, namely binbased and quantiles. binbased: the group calculation is based on bins. As a result of that each group has the same number of bins quantiles: the group calculation is based on the observed values per bin. As a result of that each group has the same number of observations.

Value

kx2 matrix with mean and variance per component

Examples

1
2
3
4
5
v <- c(2, 4, 5,6,5,2,2, 1, 1, 2,  2, 1,6,7,8,7,6, 5, 2,1)

data <- data.frame(name = 1:length(v)+5, v)
data  <- as.matrix(data)
createCluster(as.matrix(data), 2, method = 'binbased')

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