library(MASS)
example(lda)
plot(z)
How can I access all the points in z? I want to know the values of every point along LD1 and LD2 depending on their Sp (c,s,v).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you are looking for is computed as part of the
predict()method of objects of class"lda"(see?predict.lda). It is returned as componentxof the object produced bypredict(z):the last line shows the first few rows of the object scores on the linear discriminants
These scores can be plotted like so
producing the following plot (for this training sample!)