[R] Linear Discriminant Analysis

From: Soare Marcian-Alin <soarealin_at_gmail.com>
Date: Wed, 06 Jun 2007 16:48:27 +0200


I want to make a linear discriminant analysis for the dataset olive, and I get always this error:#
Warning message:
variables are collinear in: lda.default(x, grouping, ...)

## Loading Data
olive <- url("
http://www.statistik.tuwien.ac.at/public/filz/students/multi/ss07/olive.R") print(load(olive))

y <- 1:572
x <- sample(y)
y1 <- x[1:286]

train <- olive[y1,-11]
test <- olive[-y1,-11]



# Linear Discriminant Analysis
z <- lda(Region ~ . , train)
predict(z, train)

z <- lda(Region ~ . , test)
predict(z, test)

Thanks in advance!

Mit freundlichen Grssen / Best Regards

Soare Marcian-Alin

	[[alternative HTML version deleted]]

______________________________________________ R-help_at_stat.math.ethz.ch 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.

Received on Wed 06 Jun 2007 - 15:26:59 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 Wed 06 Jun 2007 - 16:31:23 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.