[R] Identifying Points That Belongs to Components of Mixture Models

From: Gundala Viswanath <gundalav_at_gmail.com>
Date: Thu, 31 Jul 2008 22:53:52 +0900

Hi all,

Suppose I have the following points:

> x

  [1] 1.376545e+00 1.017594e+00 6.734179e+00 2.537501e+00 9.614635e-02
  [6] 7.078693e-03 4.067031e-02 1.527854e+00 6.795155e-03 6.247076e-04

[11] 1.934793e-06 1.442637e-02 8.432116e-02 1.126674e-03 6.476260e+00
[16] 1.472769e-01 2.247548e+00 8.251576e-02 7.324544e+00 1.203431e-03
[21] 1.831735e+00 2.924198e-01 3.113479e-01 2.309353e+00 8.516133e+00
[26] 4.953818e-02 5.273692e+00 2.176456e+00 5.074278e-01 3.102115e-01
[31] 1.209831e+00 1.971137e-01 2.605856e-06 6.457900e-02 1.898320e+00
[36] 8.706501e-05 1.282072e-01 7.970597e-03 6.128404e-01 5.819040e+00
[41] 1.178819e-02 2.872229e-01 7.296199e+00 4.322976e-02 4.270767e+00
[46] 2.058223e+00 4.007026e+01 1.175419e+01 6.338678e-02 7.943126e+00
[51] 5.157876e+01 9.486753e+01 6.737880e+01 7.502514e+01 6.293643e+01
[56] 5.450419e+01 4.672143e+01 7.147496e+01 5.537934e+01 3.351134e+01
[61] 7.541391e+01 5.462108e+01 7.032046e+01 3.608265e+01 6.693179e+01
[66] 6.323551e+01 7.752537e+01 1.025982e+02 5.553687e+01 5.567248e+01
[71] 6.782300e+01 5.557049e+01 5.222122e+01 6.072856e+01 8.744106e+01
[76] 6.414056e+01 7.041470e+01 6.531998e+01 4.895118e+01 4.963222e+01
[81] 7.710020e+01 7.647236e+01 5.735480e+01 7.577292e+01 8.678408e+01
[86] 4.363240e+01 8.879104e+01 5.790430e+01 5.311623e+01 6.429148e+01
[91] 8.025429e+01 6.588226e+01 6.209826e+01 5.557756e+01 9.448731e+01
[96] 3.577023e+01 3.466195e+01 5.814991e+01 5.845110e+01 7.702020e+01

in which my gamma mixture models
correctly identified that these points has two components.

And the expectation maximization
(EM) code has "successfully" estimated these gamma parameters:


         comp.1 comp.2
alpha 0.2810002 15.685670
beta 7.1586151 4.050299

[1] -316.3769

Is there a way I can identify which members of "x" belong to component 1 and 2?

The posterior probability and loglikelihood for each iteration given by EM can be found here: http://dpaste.com/68667/plain/

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 31 Jul 2008 - 13:57:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 31 Jul 2008 - 14:33:03 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive