em.twocomp.m2: em.twocomp.m2

Description Usage Arguments Value Author(s) References See Also

View source: R/r23.R

Description

Expectation maximization (EM) algorithm for estimating two-component Gaussian mixture models. This is used as an internal method and is called twice from bc.fourcomp: once for the cases and once for the controls (four component model).

Usage

1
em.twocomp.m2(x.all, max.iters = 1000, errtol = 1e-09, start.vals=NULL)

Arguments

x.all

vector of data

max.iters

the maximum number of iterations to run

errtol

Error tolerance level. Approximates convergence of the maximum log likelihood value.

start.vals

starting values for the EM algorithm. If NA, the starting values are estimated from the data.

Value

max.loglike

the maximum log likelihood value for the algorithm

mu

estimated means for each component

sig

estimated standard deviation for each component

pi

estimated proportion of data in each component

n.iters

the number of iterations the algorithm took to converge

Author(s)

Michelle Winerip, Garrick Wallstrom, Joshua LaBaer

References

Dempster, Arthur P., Nan M. Laird, and Donald B. Rubin. "Maximum likelihood from incomplete data via the EM algorithm." Journal of the royal statistical society. Series B (methodological) (1977): 1-38.

See Also

bc.binorm bc.twocomp bc.fourcomp em.twocomp.m1 em.twocomp.m3


bimixt documentation built on May 2, 2019, 3:31 p.m.