Hi,

I am trying to understand how the functions em() and me() from the  
mclust package work.  I cannot make sense of what the algorithm  
returns.  Here is a basic, simple example:

#########################################
# two bivariate normals, centered at (-5,0) and (5,0), with Id  
covariance

x1 = cbind(rep(-5, 100), rep(0, 100)) + matrix(rnorm(100*2), 100, 2)
x2 = cbind(rep(5, 100), rep(0, 100)) + matrix(rnorm(100*2), 100, 2)
x = rbind(x1,x2)
plot(x[,1],x[,2])

library(mclust)

# start with equal chance of belonging to any of the two classes
out = me(modelName = 'EEE', data = x, z = 1/2*matrix(rep(1,200*2),  
200, 2))
out$parameters

# the algorithm does not recover the actual parameters!
#########################################

In particular, each time the algorithm returns the same mean for both  
populations!

I also tried the em() function with an initialization given by mstep 
(), just as in the example in help(em).

Please let me know.  Thanks.

Ery Arias-Castro


        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to