Learn R Programming

candisc (version 0.9.0)

Wine: Chemical composition of three cultivars of wine

Description

These data are the results of a chemical analysis of wines grown in the same region in Italy but derived from three different cultivars. The analysis determined the quantities of 13 constituents found in each of the three types of wines.

Arguments

Format

A data frame with 178 observations on the following 14 variables.

Cultivar

a factor with levels barolo grignolino barbera

Alcohol

a numeric vector

MalicAcid

a numeric vector

Ash

a numeric vector

AlcAsh

a numeric vector, Alkalinity of ash

Mg

a numeric vector, Magnesium

Phenols

a numeric vector, Total phenols

Flav

a numeric vector, Flavanoids

NonFlavPhenols

a numeric vector

Proa

a numeric vector, Proanthocyanins

Color

a numeric vector, color intensity

Hue

a numeric vector

OD

a numeric vector, OD280/OD315 of diluted wines

Proline

a numeric vector

Details

This data set is a classic in the machine learning literature as an easy high-D classification problem, but is also of interest for examples of MANOVA and discriminant analysis.

The precise definitions of these variables is unknown: units, how they were measured, etc.

References

In R, a comparable data set is contained in the ggbiplot package.

Examples

Run this code

data(Wine)
str(Wine)
#summary(Wine)

Wine.mlm <- lm(as.matrix(Wine[, -1]) ~ Cultivar, data=Wine)
Wine.can <- candisc(Wine.mlm)
Wine.can


plot(Wine.can, ellipse=TRUE)
plot(Wine.can, which=1)



Run the code above in your browser using DataLab