[R] Linear Discriminant Analysis Biplots
Brett Stansfield
brett at hbrc.govt.nz
Fri Apr 29 00:52:27 CEST 2005
Dear R
I'm trying to plot the lda means onto a 2 D plot of discriminant scores.
Preferably I'd like these to be in a larger font compared to the
discriminant scores.
I tried
skull.mean.pred <- predict(skulls.lda, as.data.frame(skulls.lda$means),
dimen=2)
from which I got
skull.mean.pred
$class
[1] 1 2 3 4 5
Levels: 1 2 3 4 5
$posterior
1 2 3 4 5
1 0.30359530 0.2980478 0.1985440 0.1194298 0.08038303
2 0.28170499 0.2869483 0.1998210 0.1344000 0.09712566
3 0.17098847 0.1820718 0.2614599 0.2195304 0.16594947
4 0.10825125 0.1288876 0.2310494 0.2751790 0.25663280
5 0.08350914 0.1067567 0.2001869 0.2941451 0.31540220
$x
LD1 LD2
1 -0.79515585 -0.03311963
2 -0.64549355 -0.15347046
3 0.04762133 0.33983601
4 0.56774779 0.05868023
5 0.82528029 -0.21192615
So I then went back to my original LDA plot of
plot(skull.pred$x, type="n")
* text(skull.pred$x, labels=Epoch)
and tried to change the text such that mean scores were also displayed in a
larger font
so I tried
text(skull.pred$x, labels=skull.mean.pred)
however I ended up with a really messy biplot of numbers
does anyone know how to do this properly
Brett Stansfield
More information about the R-help
mailing list