

Problem on flexmix when trying to apply signature developed in one model to a new sample.
Dear
R Users, R Core Team,

 

I have a problem when trying to know the
classification of the tested cases using two variables with the function  of flexmix:

 

After importing the database and creating
a matrix:

BM<-cbind(Data$var1,Data$var2)

 

I see that the best model has 2 groups and
use:

 

ex2
<- flexmix(BM~1, k=2, model=FLXMCmvnorm(diagonal=FALSE))

print(ex2)

plotEll(ex2, BM)

 

Then I want to test to which group one
subset of patients belongs, so I import a smaller sample of the previous data:

BM2<-data.frame (Data2$var1,Data2$var2)

 

However when I test the results I get are
from the complete training sample I used in ex2 and not from the new sample
BM2.

 

ProbMCI<-posterior(ex2, BM2)

 

And if I do the following I get double the
number of entered cases (I think because I entered 2 variables):

BM2<-cbind (Data2$var1,Data2$var2)

p<-posterior(ex2)[BMMCI,]

max.col(p)

 

(The same with clusters(ex2)[BM2])

 

In the future I would like to test the
result of this mixture also in new samples.

 

Thank you in advance 		 	   		  
	[[alternative HTML version deleted]]

