[R] LDA and confidence ellipse

Lluis l.roca at gmx.us
Thu Jul 11 11:54:20 CEST 2013


Hi,

I wish to add confidence ellipse on my LDA result of the iris data set.
Therefore:
Is there statistical logic to do that as I only wish it to make the species
separation more visable?
How can I add it to the script below  (ggplot): 
require(MASS)
require(ggplot2)
iris.lda<-lda(Species ~ Sepal.Length + Sepal.Width + Petal.Length +
Petal.Width,  data = iris)
LD1<-predict(iris.lda)$x[,1]
LD2<-predict(iris.lda)$x[,2]
ggplot(iris, aes(x=LD1, y=LD2, col=iris$Species) ) + geom_point( size = 4,
aes(color = iris$Species))+theme_bw()   

Could someone please help me. Thank you very much.



--
View this message in context: http://r.789695.n4.nabble.com/LDA-and-confidence-ellipse-tp4671308.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list