em.twocomp.m3: em.twocomp.m3

Description Usage Arguments Value Author(s) References See Also

View source: R/r23.R

Description

Expectation maximization (EM) algorithm for estimating two-component Gaussian mixtures with different mixture proportions for cases and controls (two component unconstrained model). This is used as an internal method and is called from bc.twocomp.

Usage

1
2
3
em.twocomp.m3(x.all, case.indicator, max.iters = 1000, errtol = 1e-09, 

control.comp = 1, start.vals=NULL)

Arguments

x.all

vector of cases and controls

case.indicator

a vector of equal length to x.all with 1's in the case positions and 0's in the control positions

max.iters

the maximum number of iterations to run

errtol

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

control.comp

indicator of which component contains the controls (1 or 2)

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 deviations for each component

pi.cs

estimated proportion of cases in each component

pi.ctrl

estimated proportion of controls in each component

n.iters

the number of iterations the algorithm took to converge

control.comp

indicator of which component contains the controls (1 or 2)

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.m2


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