
511Multivariate Analysis II
> xgda
Call:
lda.formula(grp ~ ., data = xg)
Prior probabilities of groups:
1 2 3
0.3333333 0.3333333 0.3333333
Group means:
X1 X2 X3
1 60.036 90.161 19.041
2 62.578 92.148 21.970
3 63.735 94.437 24.303
Coefficients of linear discriminants:
LD1 LD2
X1 0.3322028 -0.8372882
X2 0.6195081 0.5792344
X3 0.7393298 0.1252196
Proportion of trace:
LD1 LD2
0.9913 0.0087
>
The coefcients would form matrix A. We can see that the rst variable explains 99% of variance. To
obtain the individual scores we can use predict(). For brevity we only show a few individual scores.
> predict(xgda)$x
LD1 LD2
1 -3.11922510 -0.63601796
2 -3.52320100 0.67056904 ...