DATA

library(readxl)
PCAdata <- read_excel("D:/MARV BS MATH/4th year, 2nd sem/Multivariate/PCAdata.xlsx")
PCAdata
# A tibble: 32 × 10
   MAMMAL top i…¹ botto…² top c…³ bot c…⁴ top p…⁵ botpr…⁶ topmo…⁷ botmo…⁸ totals
   <chr>    <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>  <dbl>
 1 BROWN…       2       3       1       1       3       3       3       3     19
 2 MOLE         3       2       1       0       3       3       3       3     18
 3 SILVE…       2       3       1       1       2       3       3       3     18
 4 PIGHY…       2       3       1       1       2       2       3       3     17
 5 HOUSE…       2       3       1       1       1       2       3       3     16
 6 RED B…       1       3       1       1       2       2       3       3     16
 7 PIKA         2       1       0       0       2       2       3       3     13
 8 RABBIT       2       1       0       0       3       2       3       3     14
 9 BEAVER       1       1       0       0       2       1       3       3     11
10 GROUN…       1       1       0       0       2       1       3       3     11
# … with 22 more rows, and abbreviated variable names ¹​`top incisor`,
#   ²​`bottom incisor`, ³​`top cannine`, ⁴​`bot cannine`, ⁵​`top premol`,
#   ⁶​botpremol, ⁷​topmolar, ⁸​botmolar
head(PCAdata, 10)
# A tibble: 10 × 10
   MAMMAL top i…¹ botto…² top c…³ bot c…⁴ top p…⁵ botpr…⁶ topmo…⁷ botmo…⁸ totals
   <chr>    <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>  <dbl>
 1 BROWN…       2       3       1       1       3       3       3       3     19
 2 MOLE         3       2       1       0       3       3       3       3     18
 3 SILVE…       2       3       1       1       2       3       3       3     18
 4 PIGHY…       2       3       1       1       2       2       3       3     17
 5 HOUSE…       2       3       1       1       1       2       3       3     16
 6 RED B…       1       3       1       1       2       2       3       3     16
 7 PIKA         2       1       0       0       2       2       3       3     13
 8 RABBIT       2       1       0       0       3       2       3       3     14
 9 BEAVER       1       1       0       0       2       1       3       3     11
10 GROUN…       1       1       0       0       2       1       3       3     11
# … with abbreviated variable names ¹​`top incisor`, ²​`bottom incisor`,
#   ³​`top cannine`, ⁴​`bot cannine`, ⁵​`top premol`, ⁶​botpremol, ⁷​topmolar,
#   ⁸​botmolar

1. Provide the output of the standardized data (just the first 10 rows).

head(standardized, 10)
   top incisor bottom incisor top cannine bot cannine top premol  botpremol
1   -0.0286163      0.5231388   0.6156916   0.7623975  0.1767767  0.2865265
2    0.8871053     -0.4615931   0.6156916  -1.2706626  0.1767767  0.2865265
3   -0.0286163      0.5231388   0.6156916   0.7623975 -0.7660323  0.2865265
4   -0.0286163      0.5231388   0.6156916   0.7623975 -0.7660323 -0.6303584
5   -0.0286163      0.5231388   0.6156916   0.7623975 -1.7088414 -0.6303584
6   -0.9443379      0.5231388   0.6156916   0.7623975 -0.7660323 -0.6303584
7   -0.0286163     -1.4463250  -1.5734340  -1.2706626 -0.7660323 -0.6303584
8   -0.0286163     -1.4463250  -1.5734340  -1.2706626  0.1767767 -0.6303584
9   -0.9443379     -1.4463250  -1.5734340  -1.2706626 -0.7660323 -1.5472433
10  -0.9443379     -1.4463250  -1.5734340  -1.2706626 -0.7660323 -1.5472433
   topmolar  botmolar     totals
1  0.829949 0.7407648  0.9279607
2  0.829949 0.7407648  0.6186405
3  0.829949 0.7407648  0.6186405
4  0.829949 0.7407648  0.3093202
5  0.829949 0.7407648  0.0000000
6  0.829949 0.7407648  0.0000000
7  0.829949 0.7407648 -0.9279607
8  0.829949 0.7407648 -0.6186405
9  0.829949 0.7407648 -1.5466012
10 0.829949 0.7407648 -1.5466012

2. Provide the correlation matrix of the standardized data.

correlationmatrix <- cor(standardized)
correlationmatrix
               top incisor bottom incisor top cannine bot cannine top premol
top incisor     1.00000000    -0.07181198   0.6001764   0.7431854  0.5065222
bottom incisor -0.07181198     1.00000000   0.5019830   0.2986883  0.3837196
top cannine     0.60017639     0.50198298   1.0000000   0.8075729  0.5534321
bot cannine     0.74318544     0.29868835   0.8075729   1.0000000  0.4791969
top premol      0.50652224     0.38371956   0.5534321   0.4791969  1.0000000
botpremol       0.46889585     0.48602928   0.6596164   0.5562181  0.8958185
topmolar       -0.69724080    -0.07698225  -0.5274762  -0.6531624 -0.6037743
botmolar       -0.60053256     0.01830173  -0.4707950  -0.5829752 -0.5356901
totals          0.49340537     0.67797512   0.7645138   0.6288666  0.7714082
                botpremol    topmolar    botmolar     totals
top incisor     0.4688958 -0.69724080 -0.60053256  0.4934054
bottom incisor  0.4860293 -0.07698225  0.01830173  0.6779751
top cannine     0.6596164 -0.52747625 -0.47079498  0.7645138
bot cannine     0.5562181 -0.65316243 -0.58297525  0.6288666
top premol      0.8958185 -0.60377434 -0.53569015  0.7714082
botpremol       1.0000000 -0.49683831 -0.41384708  0.8782794
topmolar       -0.4968383  1.00000000  0.85463401 -0.3074015
botmolar       -0.4138471  0.85463401  1.00000000 -0.1839639
totals          0.8782794 -0.30740154 -0.18396386  1.0000000

3. Provide any plot that shows the result of the correlation matrix.

my_data <- correlationmatrix[, c(1,2,3,4,5,6,7,8)]
chart.Correlation(my_data, histogram=TRUE, pch=19)
Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

Warning in par(usr): argument 1 does not name a graphical parameter

4. Provide the output of the summary of the PCA analysis.

PCAdata.pca <- prcomp(standardized)
PCAdata.pca
Standard deviations (1, .., p=9):
[1] 2.316352e+00 1.329390e+00 8.720248e-01 7.584727e-01 4.551507e-01
[6] 3.812433e-01 3.380018e-01 2.545029e-01 2.783388e-16

Rotation (n x k) = (9 x 9):
                      PC1        PC2         PC3         PC4         PC5
top incisor     0.3240941  0.3298442 -0.24162827 -0.47438593  0.46217033
bottom incisor  0.1951418 -0.5585818 -0.10379166  0.57677520  0.42865185
top cannine     0.3696747 -0.1005681 -0.42052676  0.09186707 -0.53407345
bot cannine     0.3632926  0.1167205 -0.49318098  0.02502491 -0.04054724
top premol      0.3617563 -0.1014237  0.55715595 -0.15199997  0.01592028
botpremol       0.3698631 -0.2263192  0.35568568 -0.21130985 -0.25944470
topmolar       -0.3285131 -0.3857194 -0.16404652 -0.32205555 -0.38532864
botmolar       -0.2909905 -0.4425754 -0.21221289 -0.42944161  0.30387129
totals          0.3577417 -0.3863833 -0.04349948 -0.27807704  0.08600418
                        PC6          PC7          PC8        PC9
top incisor    -0.315100726  0.280136231 -0.202045353 -0.2656145
bottom incisor -0.080249189  0.206745469 -0.111931560 -0.2470001
top cannine    -0.538457387 -0.250722622  0.132539755 -0.1111078
bot cannine     0.735652711  0.006784597  0.230982901 -0.1196369
top premol     -0.036007585  0.095489055  0.669399253 -0.2579832
botpremol       0.241299813 -0.218958414 -0.630051317 -0.2652775
topmolar        0.055260589  0.639127149  0.015230530 -0.2289569
botmolar        0.023523075 -0.576684479  0.174437703 -0.1846960
totals         -0.004595439  0.133276744  0.002934399  0.7863337
summary(PCAdata.pca)
Importance of components:
                          PC1    PC2     PC3     PC4     PC5     PC6     PC7
Standard deviation     2.3164 1.3294 0.87202 0.75847 0.45515 0.38124 0.33800
Proportion of Variance 0.5962 0.1964 0.08449 0.06392 0.02302 0.01615 0.01269
Cumulative Proportion  0.5962 0.7925 0.87702 0.94094 0.96396 0.98011 0.99280
                          PC8       PC9
Standard deviation     0.2545 2.783e-16
Proportion of Variance 0.0072 0.000e+00
Cumulative Proportion  1.0000 1.000e+00

5. Based on the result from the original 8 variables or 8 dimensions, how many dimensions would you suggest? why?

The most obvious change in slope in the scree plot in the preceding item, occurs at component 3, which is the “elbow” of the scree plot. Therefore, it could be argued based on the basis of the scree plot that the first three components should be retained. Hence, there should be 3 dimensions to be consider.

6. With the result in doing PCA, provide an analysis of the resulting principal components.

Set as rownames the column MAMMAL
rownames(PCAdata) <- PCAdata$MAMMAL
Warning: Setting row names on a tibble is deprecated.
rownames(PCAdata)
 [1] "BROWN RAT"       "MOLE"            "SILVER HAIR BAT" "PIGHY BAT"      
 [5] "HOUSE BAT"       "RED BAT"         "PIKA"            "RABBIT"         
 [9] "BEAVER"          "GROUNDHOG"       "GRAY SQUIRREL"   "HOUSE MOUSE"    
[13] "PORCUPINE"       "WOLF"            "BEAR"            "RACCOON"        
[17] "MARTEN"          "WEASEL"          "WOLVERINE"       "BADGER"         
[21] "RIVER OTTER"     "SEA OTTER"       "JAGUAR"          "COUGAR"         
[25] "FUR SEAL"        "SEA LION"        "GREY SEAL"       "ELEPHANT SEAL"  
[29] "REINDEER"        "ELK"             "DEER"            "MOOSE"          
Remove the MAMMAL columns
PCAdata$MAMMAL <- NULL
PCAdata$MAMMAL
Warning: Unknown or uninitialised column: `MAMMAL`.
NULL
Run a PCA Analysis
PCAdata1 <- prcomp(PCAdata, center = TRUE, scale. = TRUE)
PCAdata1
Standard deviations (1, .., p=9):
[1] 2.316352e+00 1.329390e+00 8.720248e-01 7.584727e-01 4.551507e-01
[6] 3.812433e-01 3.380018e-01 2.545029e-01 1.801674e-16

Rotation (n x k) = (9 x 9):
                      PC1        PC2         PC3         PC4         PC5
top incisor     0.3240941  0.3298442 -0.24162827 -0.47438593  0.46217033
bottom incisor  0.1951418 -0.5585818 -0.10379166  0.57677520  0.42865185
top cannine     0.3696747 -0.1005681 -0.42052676  0.09186707 -0.53407345
bot cannine     0.3632926  0.1167205 -0.49318098  0.02502491 -0.04054724
top premol      0.3617563 -0.1014237  0.55715595 -0.15199997  0.01592028
botpremol       0.3698631 -0.2263192  0.35568568 -0.21130985 -0.25944470
topmolar       -0.3285131 -0.3857194 -0.16404652 -0.32205555 -0.38532864
botmolar       -0.2909905 -0.4425754 -0.21221289 -0.42944161  0.30387129
totals          0.3577417 -0.3863833 -0.04349948 -0.27807704  0.08600418
                        PC6          PC7          PC8        PC9
top incisor    -0.315100726  0.280136231 -0.202045353 -0.2656145
bottom incisor -0.080249189  0.206745469 -0.111931560 -0.2470001
top cannine    -0.538457387 -0.250722622  0.132539755 -0.1111078
bot cannine     0.735652711  0.006784597  0.230982901 -0.1196369
top premol     -0.036007585  0.095489055  0.669399253 -0.2579832
botpremol       0.241299813 -0.218958414 -0.630051317 -0.2652775
topmolar        0.055260589  0.639127149  0.015230530 -0.2289569
botmolar        0.023523075 -0.576684479  0.174437703 -0.1846960
totals         -0.004595439  0.133276744  0.002934399  0.7863337

The Scree plot below shows the percentage of explained variance by Principal Component Analysis.

fviz_eig <- fviz_eig(PCAdata1)
fviz_eig

We plot all the MAMMALS into two dimensions by taking into consideration the quality of the individuals on the factor map.

Graph of Individual
fviz_pca_ind(PCAdata1, col.ind = "cos2" , repel = TRUE)

Next, we represent the variables into two dimensions by taking into account their contribution.

Graph of Variables
fviz_pca_var(PCAdata1, col.var = "contrib", repel = TRUE)

Graph of the Biplot
fviz_pca_biplot(PCAdata1, repel = TRUE)

Here, we get the Eigenvalues and statistics for Variables and Individuals such as the Coordinates, the Contributions to the PCs and the Quality of representation

Eigenvalues
eigenvalue <- get_eigenvalue(PCAdata1)
eigenvalue
        eigenvalue variance.percent cumulative.variance.percent
Dim.1 5.365488e+00     5.961653e+01                    59.61653
Dim.2 1.767279e+00     1.963643e+01                    79.25296
Dim.3 7.604272e-01     8.449191e+00                    87.70215
Dim.4 5.752809e-01     6.392010e+00                    94.09416
Dim.5 2.071622e-01     2.301802e+00                    96.39596
Dim.6 1.453465e-01     1.614961e+00                    98.01092
Dim.7 1.142452e-01     1.269392e+00                    99.28031
Dim.8 6.477173e-02     7.196859e-01                   100.00000
Dim.9 3.246029e-32     3.606699e-31                   100.00000
By Variable
by_var <- get_pca_var(PCAdata1)
by_var$coord         
                    Dim.1      Dim.2       Dim.3       Dim.4        Dim.5
top incisor     0.7507161  0.4384917 -0.21070584 -0.35980879  0.210357152
bottom incisor  0.4520172 -0.7425732 -0.09050890  0.43746825  0.195101190
top cannine     0.8562968 -0.1336943 -0.36670976  0.06967866 -0.243083908
bot cannine     0.8415136  0.1551671 -0.43006604  0.01898071 -0.018455106
top premol      0.8379550 -0.1348317  0.48585380 -0.11528783  0.007246128
botpremol       0.8567333 -0.3008665  0.31016673 -0.16027275 -0.118086439
topmolar       -0.7609520 -0.5127716 -0.14305263 -0.24427035 -0.175382604
botmolar       -0.6740364 -0.5883554 -0.18505491 -0.32571974  0.138307230
totals          0.8286559 -0.5136542 -0.03793263 -0.21091385  0.039144865
                      Dim.6        Dim.7         Dim.8         Dim.9
top incisor    -0.120130054  0.094686559 -0.0514211302 -4.785507e-17
bottom incisor -0.030594469  0.069880347 -0.0284869076 -4.450137e-17
top cannine    -0.205283294 -0.084744706  0.0337317532 -2.001800e-17
bot cannine     0.280462698  0.002293206  0.0587858203 -2.155466e-17
top premol     -0.013727652  0.032275475  0.1703640570 -4.648017e-17
botpremol       0.091993947 -0.074008345 -0.1603498930 -4.779435e-17
topmolar        0.021067732  0.216026148  0.0038762142 -4.125058e-17
botmolar        0.008968016 -0.194920411  0.0443949028 -3.327619e-17
totals         -0.001751981  0.045047784  0.0007468132  1.416717e-16
by_var$contrib        
                   Dim.1     Dim.2      Dim.3       Dim.4       Dim.5
top incisor    10.503699 10.879722  5.8384221 22.50420132 21.36014141
bottom incisor  3.808032 31.201358  1.0772708 33.26696271 18.37424045
top cannine    13.665937  1.011394 17.6842758  0.84395581 28.52344518
bot cannine    13.198151  1.362367 24.3227475  0.06262464  0.16440789
top premol     13.086763  1.028676 31.0422755  2.31039905  0.02534554
botpremol      13.679874  5.122036 12.6512305  4.46518512  6.73115536
topmolar       10.792084 14.877946  2.6911261 10.37197778 14.84781640
botmolar        8.467545 19.587296  4.5034313 18.44200947  9.23377580
totals         12.797915 14.929205  0.1892205  7.73268411  0.73967197
                      Dim.6        Dim.7       Dim.8     Dim.9
top incisor     9.928846733  7.847630797  4.08223248  7.055105
bottom incisor  0.643993235  4.274368897  1.25286741  6.100906
top cannine    28.993635758  6.286183324  1.75667867  1.234494
bot cannine    54.118491080  0.004603076  5.33531006  1.431298
top premol      0.129654620  0.911815956 44.80953596  6.655534
botpremol       5.822559990  4.794278727 39.69646622  7.037214
topmolar        0.305373273 40.848351303  0.02319690  5.242128
botmolar        0.055333504 33.256498868  3.04285122  3.411260
totals          0.002111806  1.776269051  0.00086107 61.832061
by_var$cos2    
                   Dim.1      Dim.2       Dim.3        Dim.4        Dim.5
top incisor    0.5635747 0.19227498 0.044396952 0.1294623619 4.425013e-02
bottom incisor 0.2043195 0.55141490 0.008191861 0.1913784677 3.806447e-02
top cannine    0.7332442 0.01787416 0.134476049 0.0048551162 5.908979e-02
bot cannine    0.7081452 0.02407682 0.184956796 0.0003602675 3.405909e-04
top premol     0.7021687 0.01817958 0.236053917 0.0132912834 5.250637e-05
botpremol      0.7339920 0.09052064 0.096203402 0.0256873552 1.394441e-02
topmolar       0.5790480 0.26293475 0.020464056 0.0596680025 3.075906e-02
botmolar       0.4543251 0.34616207 0.034245318 0.1060933499 1.912889e-02
totals         0.6866706 0.26384064 0.001438884 0.0444846513 1.532320e-03
                      Dim.6        Dim.7        Dim.8        Dim.9
top incisor    1.443123e-02 8.965545e-03 2.644133e-03 2.290108e-33
bottom incisor 9.360215e-04 4.883263e-03 8.115039e-04 1.980372e-33
top cannine    4.214123e-02 7.181665e-03 1.137831e-03 4.007205e-34
bot cannine    7.865933e-02 5.258795e-06 3.455773e-03 4.646034e-34
top premol     1.884484e-04 1.041706e-03 2.902391e-02 2.160406e-33
botpremol      8.462886e-03 5.477235e-03 2.571209e-02 2.284300e-33
topmolar       4.438493e-04 4.666730e-02 1.502504e-05 1.701610e-33
botmolar       8.042530e-05 3.799397e-02 1.970907e-03 1.107305e-33
totals         3.069436e-06 2.029303e-03 5.577299e-07 2.007087e-32
By Individual
by_ind <- get_pca_ind(PCAdata1)
by_ind$coord         
        Dim.1       Dim.2       Dim.3       Dim.4        Dim.5       Dim.6
1   0.6110822 -1.36388228 -0.81560801 -0.53991605 -0.235139741  0.31816935
2  -0.1335526 -0.62956710  0.08145655 -1.50715275 -0.178195395 -1.38555596
3   0.1593583 -1.14874294 -1.32744441 -0.31059425 -0.276752362  0.35353909
4  -0.2904204 -0.82171814 -1.64011198 -0.03083258 -0.065474261  0.13371639
5  -0.7421443 -0.60657880 -2.15194838  0.19848923 -0.107086882  0.16908613
6  -0.6978571 -1.00424746 -1.40539248  0.48958773 -0.515296456  0.42368240
7  -2.6652321  0.73930957  0.54137545 -1.07469674  0.235488884 -0.01942525
8  -2.2135082  0.52417023  1.05321184 -1.30401855  0.277101505 -0.05479498
9  -3.5224475  0.88380506  0.46342738 -0.27451476 -0.003055209  0.05071806
10 -3.5224475  0.88380506  0.46342738 -0.27451476 -0.003055209  0.05071806
11 -3.9741714  1.09894439 -0.04840902 -0.04519296 -0.044667830  0.08608780
12 -4.8756740  1.64110853 -0.87291299  0.46389051  0.124997650 -0.09836516
13 -3.9741714  1.09894439 -0.04840902 -0.04519296 -0.044667830  0.08608780
14  2.1583556 -1.19423779 -0.03809595 -1.14127416  0.427762156  0.15537252
15  2.1583556 -1.19423779 -0.03809595 -1.14127416  0.427762156  0.15537252
16  2.1925745 -1.02116668  0.06709812 -0.91786678 -0.381758587  0.18309987
17  2.6692427  0.03739195  0.44255331 -0.06157544  0.383731780  0.06853230
18  1.7677402  0.57955608 -0.38195065  0.44750803  0.553397261 -0.11592066
19  2.6692427  0.03739195  0.44255331 -0.06157544  0.383731780  0.06853230
20  1.7677402  0.57955608 -0.38195065  0.44750803  0.553397261 -0.11592066
21  2.2194640  0.36441674  0.12988574  0.21818623  0.595009881 -0.15129040
22  1.4649210  1.24912554 -0.26628843 -0.03444606  0.104687267 -0.03547526
23  1.5905145  1.60893130 -0.40169656  1.37882276  0.337899802 -0.36529979
24  1.5905145  1.60893130 -0.40169656  1.37882276  0.337899802 -0.36529979
25  2.6389766  1.40931183  0.85113721  0.10802352 -0.491753773  0.11942127
26  2.6389766  1.40931183  0.85113721  0.10802352 -0.491753773  0.11942127
27  1.2265869  0.71984623 -0.45401602 -0.46259173 -0.278057916  0.02180853
28  1.9287208  1.89635198  1.20151894  0.14648974 -1.390285961  0.48983268
29 -0.7502246 -2.51629396  0.55429059  1.01801636 -0.630241993 -0.67654874
30 -0.7502246 -2.51629396  0.55429059  1.01801636 -0.630241993 -0.67654874
31 -1.6701456 -2.17662158  1.48833173  0.90292268  0.512308994  0.50362352
32 -1.6701456 -2.17662158  1.48833173  0.90292268  0.512308994  0.50362352
           Dim.7       Dim.8         Dim.9
1   0.1320187008  0.28731910  3.330669e-16
2   0.1299379493 -0.25798541 -9.992007e-16
3   0.0007655619 -0.34470424  7.771561e-16
4   0.1603000366  0.23207264  4.440892e-16
5   0.0290468978 -0.39995069  8.881784e-16
6  -0.1374519590  0.41618227  6.661338e-16
7   0.1232913255 -0.31086115 -1.110223e-16
8   0.2545444644  0.32116219 -4.440892e-16
9  -0.0149261955  0.45002536  0.000000e+00
10 -0.0149261955  0.45002536  0.000000e+00
11 -0.1461793344 -0.18199797  2.220446e-16
12 -0.1178979986 -0.23724442  2.220446e-16
13 -0.1461793344 -0.18199797  2.220446e-16
14 -0.3187028311  0.14136833  2.220446e-16
15 -0.3187028311  0.14136833  2.220446e-16
16  1.1197087421 -0.07217142 -2.220446e-16
17 -0.3206756415 -0.10634660  1.110223e-16
18 -0.2923943057 -0.16159305  1.942890e-16
19 -0.3206756415 -0.10634660  1.110223e-16
20 -0.2923943057 -0.16159305  1.942890e-16
21 -0.1611411668  0.47043029 -2.220446e-16
22 -0.5372083648 -0.05227814  3.608225e-16
23  0.5853595504  0.18455650 -3.330669e-16
24  0.5853595504  0.18455650 -3.330669e-16
25  0.1527296808 -0.22765903 -2.220446e-16
26  0.1527296808 -0.22765903 -2.220446e-16
27  0.1829838270 -0.03519055  1.942890e-16
28 -0.3898363740  0.06576551  1.665335e-16
29 -0.2736899196  0.07571365 -8.326673e-16
30 -0.2736899196  0.07571365 -8.326673e-16
31  0.2339481756 -0.21534018 -2.220446e-16
32  0.2339481756 -0.21534018 -2.220446e-16
by_ind$contrib        
         Dim.1      Dim.2        Dim.3        Dim.4        Dim.5        Dim.6
1   0.21749040  3.2892644  2.733728151  1.583516438 8.340492e-01  2.176517503
2   0.01038833  0.7008564  0.027267439 12.339132855 4.789967e-01 41.275622118
3   0.01479075  2.3334082  7.241441805  0.524030923 1.155373e+00  2.687326041
4   0.04912414  1.1939627 11.054506526  0.005164042 6.466671e-02  0.384427783
5   0.32078753  0.6506081 19.030756701  0.214014883 1.729865e-01  0.614697500
6   0.28364415  1.7833086  8.116851664  1.302060468 4.005474e+00  3.859458043
7   4.13724162  0.9664907  1.204451918  6.273963191 8.365278e-01  0.008112944
8   2.85366568  0.4858360  4.558519616  9.237142358 1.158290e+00  0.064554586
9   7.22653118  1.3812045  0.882583350  0.409356336 1.408061e-04  0.055305815
10  7.22653118  1.3812045  0.882583350  0.409356336 1.408061e-04  0.055305815
11  9.19885991  2.1354846  0.009630414  0.011094602 3.009742e-02  0.159341435
12 13.84554749  4.7623315  3.131369174  1.168963844 2.356912e-01  0.208031007
13  9.19885991  2.1354846  0.009630414  0.011094602 3.009742e-02  0.159341435
14  2.71323132  2.5218929  0.005964169  7.075384910 2.760224e+00  0.519031716
15  2.71323132  2.5218929  0.005964169  7.075384910 2.760224e+00  0.519031716
16  2.79994526  1.8439039  0.018501762  4.576457173 2.198453e+00  0.720811243
17  4.14970242  0.0024723  0.804865944  0.020596107 2.221238e+00  0.100980177
18  1.82002632  0.5939309  0.599524420  1.087856903 4.619698e+00  0.288913049
19  4.14970242  0.0024723  0.804865944  0.020596107 2.221238e+00  0.100980177
20  1.82002632  0.5939309  0.599524420  1.087856903 4.619698e+00  0.288913049
21  2.86904288  0.2348236  0.069329063  0.258597772 5.340574e+00  0.492116821
22  1.24988265  2.7590349  0.291404960  0.006445390 1.653207e-01  0.027058055
23  1.47338437  4.5774122  0.663114590 10.327304585 1.722326e+00  2.869091042
24  1.47338437  4.5774122  0.663114590 10.327304585 1.722326e+00  2.869091042
25  4.05613030  3.5120380  2.977086894  0.063387957 3.647833e+00  0.306625914
26  4.05613030  3.5120380  2.977086894  0.063387957 3.647833e+00  0.306625914
27  0.87626905  0.9162722  0.847100068  1.162427369 1.166300e+00  0.010225820
28  2.16660390  6.3589135  5.932716542  0.116569382 2.915734e+01  5.158708568
29  0.32781090 11.1961258  1.262604608  5.629626947 5.991758e+00  9.841100547
30  0.32781090 11.1961258  1.262604608  5.629626947 5.991758e+00  9.841100547
31  1.62461136  8.3774314  9.103152917  4.428648608 3.959164e+00  5.453276290
32  1.62461136  8.3774314  9.103152917  4.428648608 3.959164e+00  5.453276290
          Dim.7       Dim.8     Dim.9
1  4.767413e-01  3.98284587 10.679737
2  4.618319e-01  3.21110720 96.117629
3  1.603144e-05  5.73268101 58.145232
4  7.028767e-01  2.59843836 18.986198
5  2.307870e-02  7.71751405 75.944793
6  5.167896e-01  8.35663959 42.718946
7  4.157928e-01  4.66226995  1.186637
8  1.772308e+00  4.97637772 18.986198
9  6.094108e-03  9.77098856  0.000000
10 6.094108e-03  9.77098856  0.000000
11 5.844991e-01  1.59807671  4.746550
12 3.802111e-01  2.71554216  4.746550
13 5.844991e-01  1.59807671  4.746550
14 2.778330e+00  0.96420364  4.746550
15 2.778330e+00  0.96420364  4.746550
16 3.429431e+01  0.25130145  4.746550
17 2.812832e+00  0.54564696  1.186637
18 2.338567e+00  1.25982402  3.634077
19 2.812832e+00  0.54564696  1.186637
20 2.338567e+00  1.25982402  3.634077
21 7.102724e-01 10.67714320  4.746550
22 7.894006e+00  0.13185748 12.533858
23 9.372541e+00  1.64332399 10.679737
24 9.372541e+00  1.64332399 10.679737
25 6.380560e-01  2.50054265  4.746550
26 6.380560e-01  2.50054265  4.746550
27 9.158774e-01  0.05974707  3.634077
28 4.156968e+00  0.20867045  2.669934
29 2.048941e+00  0.27657498 66.748354
30 2.048941e+00  0.27657498 66.748354
31 1.497101e+00  2.23725072  4.746550
32 1.497101e+00  2.23725072  4.746550
by_ind$cos2  
         Dim.1        Dim.2        Dim.3        Dim.4        Dim.5        Dim.6
1  0.108337783 0.5396776671 0.1929939258 0.0845732754 1.604105e-02 0.0293695541
2  0.003773047 0.0838438769 0.0014035869 0.4805093548 6.717076e-03 0.4061023001
3  0.007206349 0.3744652383 0.5000327900 0.0273749046 2.173444e-02 0.0354683246
4  0.023744135 0.1900850330 0.7572672472 0.0002676220 1.206822e-03 0.0050335160
5  0.095128089 0.0635486847 0.7998265290 0.0068046530 1.980636e-03 0.0049379657
6  0.112019974 0.2319764652 0.4543156494 0.0551345076 6.107687e-02 0.0412898481
7  0.766634927 0.0589890209 0.0316311978 0.1246494586 5.984934e-03 0.0000407241
8  0.595204899 0.0333771252 0.1347521451 0.2065721432 9.327859e-03 0.0003647420
9  0.906712700 0.0570812657 0.0156943742 0.0055069616 6.821228e-07 0.0001879775
10 0.906712700 0.0570812657 0.0156943742 0.0055069616 6.821228e-07 0.0001879775
11 0.925251170 0.0707486060 0.0001372837 0.0001196487 1.168843e-04 0.0004341599
12 0.863247829 0.0978004337 0.0276699318 0.0078144273 5.673746e-04 0.0003513571
13 0.925251170 0.0707486060 0.0001372837 0.0001196487 1.168843e-04 0.0004341599
14 0.603640622 0.1848051490 0.0001880572 0.1687766730 2.371031e-02 0.0031281017
15 0.603640622 0.1848051490 0.0001880572 0.1687766730 2.371031e-02 0.0031281017
16 0.590923888 0.1281787673 0.0005534056 0.1035576349 1.791433e-02 0.0041209646
17 0.938470361 0.0001841622 0.0257973808 0.0004994126 1.939545e-02 0.0006186358
18 0.737313207 0.0792512452 0.0344214908 0.0472516339 7.225854e-02 0.0031705662
19 0.938470361 0.0001841622 0.0257973808 0.0004994126 1.939545e-02 0.0006186358
20 0.737313207 0.0792512452 0.0344214908 0.0472516339 7.225854e-02 0.0031705662
21 0.857073012 0.0231056527 0.0029352464 0.0082827828 6.159847e-02 0.0039823949
22 0.525727813 0.3822475461 0.0173714914 0.0002906776 2.684851e-03 0.0003083072
23 0.324107608 0.3316568589 0.0206733190 0.2435739664 1.462817e-02 0.0170967211
24 0.324107608 0.3316568589 0.0206733190 0.2435739664 1.462817e-02 0.0170967211
25 0.695189326 0.1982650693 0.0723154617 0.0011648464 2.413945e-02 0.0014236243
26 0.695189326 0.1982650693 0.0723154617 0.0011648464 2.413945e-02 0.0014236243
27 0.588775643 0.2027835156 0.0806669308 0.0837430748 3.025685e-02 0.0001861255
28 0.334819667 0.3236757410 0.1299371965 0.0019314641 1.739725e-01 0.0215957236
29 0.061353118 0.6902029665 0.0334910745 0.1129701192 4.329809e-02 0.0498944516
30 0.061353118 0.6902029665 0.0334910745 0.1129701192 4.329809e-02 0.0498944516
31 0.249616914 0.4239661655 0.1982279170 0.0729569149 2.348709e-02 0.0226974650
32 0.249616914 0.4239661655 0.1982279170 0.0729569149 2.348709e-02 0.0226974650
          Dim.7        Dim.8        Dim.9
1  5.056518e-03 0.0239502281 3.218427e-32
2  3.571571e-03 0.0140791874 2.111995e-31
3  1.663131e-07 0.0337177864 1.713888e-31
4  7.233849e-03 0.0151617758 5.551913e-32
5  1.457242e-04 0.0276277180 1.362488e-31
6  4.345746e-03 0.0398409420 1.020670e-31
7  1.640528e-03 0.0104292103 1.330268e-33
8  7.871029e-03 0.0125300567 2.395767e-32
9  1.628092e-05 0.0147997581 0.000000e+00
10 1.628092e-05 0.0147997581 0.000000e+00
11 1.251810e-03 0.0019404370 2.888331e-33
12 5.047532e-04 0.0020438932 1.790386e-33
13 1.251810e-03 0.0019404370 2.888331e-33
14 1.316147e-02 0.0025896239 6.388706e-33
15 1.316147e-02 0.0025896239 6.388706e-33
16 1.541108e-01 0.0006402555 6.060428e-33
17 1.354492e-02 0.0014896754 1.623547e-33
18 2.017219e-02 0.0061611321 8.906595e-33
19 1.354492e-02 0.0014896754 1.623547e-33
20 2.017219e-02 0.0061611321 8.906595e-33
21 4.517879e-03 0.0385045580 8.578316e-33
22 7.069978e-02 0.0006695342 3.189479e-32
23 4.389948e-02 0.0043638786 1.421271e-32
24 4.389948e-02 0.0043638786 1.421271e-32
25 2.328514e-03 0.0051737061 4.921670e-33
26 2.328514e-03 0.0051737061 4.921670e-33
27 1.310324e-02 0.0004846244 1.477235e-32
28 1.367845e-02 0.0003892859 2.496176e-33
29 8.165291e-03 0.0006248884 7.557829e-32
30 8.165291e-03 0.0006248884 7.557829e-32
31 4.897841e-03 0.0041496883 4.412104e-33
32 4.897841e-03 0.0041496883 4.412104e-33
PCAdata.pca$rotation[,1]
   top incisor bottom incisor    top cannine    bot cannine     top premol 
     0.3240941      0.1951418      0.3696747      0.3632926      0.3617563 
     botpremol       topmolar       botmolar         totals 
     0.3698631     -0.3285131     -0.2909905      0.3577417 

This means that the first principal component is a linear combination of the variables: 0.3240941Z1 + 0.1951418Z2 + 0.3696747Z3 + 0.3632926Z4 + 0.3617563Z5 + 0.3698631Z6 -0.3285131Z7 -0.2909905Z8 + 0.3577417*Z9 , where Z2, Z3, Z4…Z9 are the standardised versions of the variables top incisor, bottom incisor, top cannine, bot cannine, top premol, botpremol, topmolar, and botmolar.