Hi,
I have a strange behavior of plot function when trying to plot a
discriminant analysis obtained by fda.
I'd attached the data for reproduction. I made the same analysis (linear
discriminant analysis) but using lda and fda (default args, using
"polyreg"). The resulting coefficients and trace proportions for the two
analysis are the same, that's good, but if you plot the two analysis the
graphs are very different. Plotting the results of lda function gives much
more overlapping of points from different groups than using fda.


 If you make:

libray(MASS)
library(mda)

read.table("data", header=T) -> data

data[,1] -> grp
data[,2:24] -> X

#Linear discriminant analysis using fda
fda(grp ~ ., data=X) -> FDA
plot(FDA)

#Linear discriminant analysis using lda
lda(grp ~ ., data=X) -> LDA
plot(LDA, col=palette()[grp])# Very different results

#Same coefficients
coef(FDA)
coef(LDA)

Regards,
______________________________________________
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