EM_fit: EM Fit Of K-mixture Components

Description Usage Arguments Value

View source: R/EM_fit.R

Description

For the estimation of GMM with only K=1 component we have used the function MASS::fitdistr().For the estimation of GMM with k=2,...,K components an EM algorithm is used to obtain needed output.

Usage

1
EM_fit(data, K, take_resist = F, plot = F, tolerance = 0.001)

Arguments

data

vector of binned data

K

number of Gaussian components for mixture model.

take_resist

logical, whether or not to consider first bin referring to resistant observations, default is FALSE.

plot

logical, whether or not to plot final fit of GMM on original data, default is FALSE.

tolerance

tolerance for the Aitken-acceleration based stopping criterion, default is 0.001.

Value


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