Discriminant analysis
Discriminant analysis is one of the earliest statistical methods that is used to classify observations into distinct populations. As with many of the earlier pioneering works in statistics, this technique too had been invented by the great Sir R. A. Fisher. The theory of discriminant analysis is beyond the scope of this book. We would simply be content with the use of the lda
function from the MASS
package. Before applying the lda
R technique to the German credit data, we will first apply it on the iris
dataset, which is also popular thanks to Fisher. Following the application of the method to the iris
dataset, we will then apply it to the German credit data problem.
Getting ready
The requirement of the iris
dataset and the MASS
package is met by default R software. The reader needs to have prepared the GC2
data frame as in the first section.
How to do it...
We get an initial understanding of the iris
data set with simple functions. In this dataset, we have five variables...