[R] discriminant analysis with lda(MASS)

From: Silvia Lomascolo <slomascolo_at_zoo.ufl.edu>
Date: Mon, 18 Jun 2007 08:48:19 -0700 (PDT)

I use Widows, R version 2.4.1

I have 4 questions on lda (MASS) (code is pasted below):

1st. How can I obtain the statistics and p-value associated with discriminant analysis? Am I supposed to calculate that manually by squaring the svd value and looking the p value up in a table? I am writing the following code:

training.mx<-read.table('C:\\Documents and Settings\\silvia\\My Documents\\silvia\\paper Martin\\trainingAndvalidation.txt', header=T) train <- sample (1:148) ##in a file with 399 cases, I am using the first 148 as a training set
training.df <- lda (disperser~., training.mx, subset=train) predict (training.df, training.mx[-train,])$class

2nd. How can I get the scores for each species on the discriminant functions? I only get the scores for the group means, but I need the values for all species.

3rd. Is it possible to obtain confidence intervals for my groups?

4th. (this is part of a previous posting but it's related to all my previous questions so here it goes again) When I try to plot the resulting discriminant functions following the example I found in the help, I get an error saying that 'panel.lda' doesn't exist. Am I supposed to create it? Here is the code for the plot:

plot(x, panel = panel.lda, cex = 0.7, dimen=1,

     xlab = "LD1", ylab = "LD2")

Help on any or all of these questions will be greatly appreciated!


View this message in context: http://www.nabble.com/discriminant-analysis-with-lda%28MASS%29-tf3941130.html#a11178433
Sent from the R help mailing list archive at Nabble.com.

R-help_at_stat.math.ethz.ch mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 18 Jun 2007 - 15:52:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 18 Jun 2007 - 16:32:02 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.