Description Usage Arguments Value Author(s) References See Also

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`

.

1 2 3 | ```
em.twocomp.m3(x.all, case.indicator, max.iters = 1000, errtol = 1e-09,
control.comp = 1, start.vals=NULL)
``` |

`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 |

`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) |

Michelle Winerip, Garrick Wallstrom, Joshua LaBaer

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.

`bc.binorm`

`bc.twocomp`

`bc.fourcomp`

`em.twocomp.m1`

`em.twocomp.m2`

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.