Description Usage Arguments Value Author(s) Examples
Takes in a samples by variables data matrix and produces a PCA biplot.
1 | PCA.biplot(D, method = NULL, ax.tickvec.D = NULL, ...)
|
D |
A samples by variables data matrix |
method |
the mod.PCA algorithm |
ax.tickvec.D |
tick marker length per axis in the PCA biplot |
... |
Other arguments. Currently ignored |
The PCA biplot of D with some parameters
Opeoluwa F. Oyedele and Sugnet Gardner-Lubbe
1 2 3 4 5 6 7 8 | if(require(pls))
data(oliveoil, package="pls")
Dmat = as.matrix(oliveoil) #(16x11) overall original data matrix
dimnames(Dmat) = list(paste(c("G1","G2","G3","G4","G5","I1","I2","I3","I4","I5",
"S1","S2","S3","S4","S5","S6")),
paste(c("Acidity","Peroxide","K232","K270","DK","Yellow",
"Green","Brown","Glossy","Transp","Syrup")))
PCA.biplot(D=Dmat, method=mod.PCA, ax.tickvec.D=c(8,5,5,7,6,4,5,5,8,7,7))
|
Loading required package: pls
Attaching package: 'pls'
The following object is masked from 'package:stats':
loadings
$overall.quality
[1] 0.99
$axis.pred
Acidity Peroxide K232 K270 DK Yellow Green Brown
0.935 0.993 0.997 0.987 0.635 0.978 0.940 0.981
Glossy Transp Syrup
0.998 0.997 0.999
$sample.pred
G1 G2 G3 G4 G5 I1 I2 I3 I4 I5 S1 S2 S3
0.946 0.981 0.988 0.962 1.206 1.084 1.029 0.877 0.960 0.953 0.980 0.974 1.068
S4 S5 S6
0.994 0.974 0.950
$D.hat
Acidity Peroxide K232 K270 DK Yellow Green Brown Glossy Transp
G1 0.654 13.24 1.79 0.1436 0.000781 17.0 76.84 8.35 76.0 69.8
G2 0.402 13.92 1.78 0.1282 -0.000893 39.9 46.98 12.23 78.5 74.7
G3 0.380 11.06 1.56 0.1124 -0.001863 50.9 35.48 8.44 83.2 80.7
G4 0.543 13.02 1.75 0.1343 -0.000101 28.7 62.14 9.32 77.9 73.0
G5 0.466 12.12 1.66 0.1241 -0.000923 39.0 49.68 8.94 80.4 76.5
I1 0.291 19.34 2.15 0.1465 -0.000195 34.4 49.28 21.19 71.8 67.2
I2 0.290 13.97 1.76 0.1200 -0.001712 50.9 32.89 13.60 80.0 77.4
I3 0.396 16.23 1.95 0.1391 -0.000289 33.4 53.20 15.57 75.1 70.5
I4 0.256 13.52 1.71 0.1153 -0.002086 55.6 27.29 13.36 81.2 79.0
I5 0.111 20.48 2.19 0.1386 -0.001208 48.7 29.93 24.89 72.6 69.5
S1 0.180 10.79 1.50 0.0962 -0.003423 71.5 9.26 10.39 86.4 86.1
S2 0.221 9.24 1.39 0.0917 -0.003547 72.1 9.89 7.72 88.2 88.0
S3 0.238 12.32 1.62 0.1081 -0.002559 61.0 21.33 11.87 83.3 81.8
S4 0.175 12.03 1.59 0.1020 -0.003104 68.1 12.50 12.19 84.6 83.8
S5 0.194 10.19 1.46 0.0943 -0.003482 71.9 9.32 9.36 87.1 86.9
S6 0.193 10.54 1.48 0.0959 -0.003395 71.0 10.18 9.88 86.6 86.2
Syrup
G1 49.3
G2 48.9
G3 46.5
G4 48.7
G5 47.7
I1 52.8
I2 48.5
I3 50.7
I4 48.0
I5 53.0
S1 45.5
S2 44.4
S3 46.9
S4 46.5
S5 45.0
S6 45.3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.