I was trying to run the Mixture Discrimination Analysis with the "mda" package in R. However, when I followed the manual and ran the following script. I realized that the result was not unique:
library(mda)
data(iris)
irisfit <- mda(Species ~ ., data = iris)
irisfit
The result sometimes look like this:
Call: mda(formula = Species ~ ., data = iris)
Dimension: 4
Percent Between-Group Variance Explained: v1 v2 v3 v4 95.06 97.78 99.59 100.00
Degrees of Freedom (per dimension): 5
Training Misclassification Error: 0.01333 ( N = 150 )
Deviance: 13.302
And sometimes like this:
Call: mda(formula = Species ~ ., data = iris)
Dimension: 5
Percent Between-Group Variance Explained: v1 v2 v3 v4 v5 96.14 98.47 99.89 100.00 100.00
Degrees of Freedom (per dimension): 5
Training Misclassification Error: 0.02 ( N = 150 )
Deviance: 15.249
I have tried it on different workstations and different R versions, but the situation stayed the same. So it should not be the system's problem.
As far as I understood, how the MDA was been performed should lead to a unique result. Do anyone might have an idea on how could this happened?